-
1. Re: Problem with selectItems
pmuir Mar 26, 2007 11:28 AM (in response to hasc)Try using s:selectItems in Seam (take a look at the ui example)
-
2. Re: Problem with selectItems
hasc Mar 26, 2007 11:43 AM (in response to hasc)using s:selectItems leads to the same error message
-
3. Re: Problem with selectItems
pmuir Mar 26, 2007 11:45 AM (in response to hasc)Lets see some code - how you create the list, how you use it, and the stack trace. Also, what version of JSF and Seam are you using.
-
4. Re: Problem with selectItems
hasc Mar 26, 2007 11:54 AM (in response to hasc)first thanks you for the fast answers and your help.
the way i generate the list and the way i use it can u see in my initial post.
the stack trace is the following:java.lang.IllegalArgumentException: "Expected a child component type of UISelectItem/UISelectItems for component type javax.faces.SelectOne(j_id10). at com.sun.faces.renderkit.RenderKitUtils.getSelectItems(RenderKitUtils.java:342) at com.sun.faces.renderkit.html_basic.MenuRenderer.getOptionNumber(MenuRenderer.java:506) at com.sun.faces.renderkit.html_basic.MenuRenderer.renderSelect(MenuRenderer.java:482) at com.sun.faces.renderkit.html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:447) at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:847) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:893) at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889) at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571) at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108) at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:229) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:108) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:266) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:159) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:96) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:220) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112) at java.lang.Thread.run(Thread.java:619)
-
5. Re: Problem with selectItems
hasc Mar 26, 2007 11:55 AM (in response to hasc)and i use jsf1.2 RI with facelets
-
6. Re: Problem with selectItems
hasc Mar 26, 2007 11:56 AM (in response to hasc)... and jboss-seam-1.2.0.PATCH1
-
7. Re: Problem with selectItems
pmuir Mar 26, 2007 12:30 PM (in response to hasc)Take a look at the ui example to see how to use s:selectItems (it decouples your business and presentation logic)
-
8. Re: Problem with selectItems
hasc Mar 26, 2007 12:50 PM (in response to hasc)i looked at the examples but they do not help me. in the example they get the objects by a named query.
my goal is to set up a stateless ejb that serves lists to display them e.g. in the selectItems component. As soon as that works i want to retrieve the objects out of a database. -
9. Re: Problem with selectItems
martin.krajci Sep 2, 2007 12:32 PM (in response to hasc)I had the same problem and the solution was very simple. On the bean where @Factory annotation is used the @Name must be specified. This way seam initializes the factory and doesn't return null.
-
10. Re: Problem with selectItems
xl4613 Sep 7, 2007 7:00 AM (in response to hasc)try to use <s:selectItem>.
-
11. Re: Problem with selectItems
xl4613 Sep 7, 2007 7:01 AM (in response to hasc)try <s:selectItem>.