struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvanma...@comcast.net (Gary VanMatre)
Subject Re: tomahawk + shale clay - Solution
Date Fri, 07 Jul 2006 15:05:20 GMT
>From: "stephan opitz" <stephan.opitz@gmail.com> 

> thx, but how i register them? 
>

To register a managed bean using JSF, look in the /WEB-INF/faces-config.xml.  Try something
like this:

  <managed-bean>
    <managed-bean-name>calendarBean</managed-bean-name>
    <managed-bean-class>org.acme.CalendarBean</managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
  </managed-bean>

A few more examples:
http://svn.apache.org/viewvc/shale/trunk/shale-apps/shale-usecases/src/main/webapp/WEB-INF/faces-config.xml?view=log
http://svn.apache.org/viewvc/shale/trunk/shale-apps/shale-clay-usecases/src/main/webapp/WEB-INF/faces-config.xml?view=log

Gary

 
> 2006/7/7, Gary VanMatre : 
> > >hello, 
> > > 
> > >i followed your instructions with the tomahawk-view-config.xml and 
> > >include it into web.xml 
> > >also i added tomahawk 1.11 libary into lib folder... 
> > > 
> > >now i wanted to use the calendar! 
> > > 
> > >i copied CalendarBean from simple example... also i a configured als 
> > >rules. managed beans etc. 
> > > 
> > >already little code like this: 
> > > 
> > > > > >weekRowClass="weekHeader" 
> > > currentDayCellClass="currentDayCell" 
> > >value="#{calendarBean.firstDate}"/> 
> > > 
> > > 
> > >throws exception: 
> > >14:04:42,015 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception

> > >javax.faces.el.EvaluationException: Cannot get value for expression 
> > >'> > >weekRowClass="weekHeader" 
> > > currentDayCellClass="currentDayCell" 
> > >value="#{calendarBean.firstDate}"/>' 
> > > 
> > >Caused by: java.lang.IllegalStateException: No WebApplicationContext 
> > >found: no ContextLoaderListener registered? 
> > >at 
> > 
> >org.springframework.web.jsf.FacesContextUtils.getRequiredWebApplicationContext( 
> F 
> > >acesContextUtils.java:78) 
> > > at 
> > 
> >org.springframework.web.jsf.DelegatingVariableResolver.getWebApplicationContext 
> ( 
> > >DelegatingVariableResolver.java:134) 
> > > 
> > >no final solution found for the 
> > >No WebApplicationContext found: no ContextLoaderListener registered? 
> > > 
> > >problem in this context. 
> > > 
> > 
> > I think the problem is that you have the shale-spring.jar in your classpath 
> but your have not registered any spring beans. 
> > 
> > 
> > 
> > contextConfigLocation 
> > 
> > 
> > 
> > 
> > The "calendarBean", managed bean is not registered in the faces-config or 
> spring config. 
> > 
> > 
> > >stephan 
> > 
> > Gary 
> > 
> 
> --------------------------------------------------------------------- 
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org 
> For additional commands, e-mail: user-help@struts.apache.org 
> 
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message