[jboss-user] [JBoss Seam] - selectManyMenu and EntityHome

ector7280 do-not-reply at jboss.com
Fri Mar 16 17:08:07 EDT 2007


I successfully used, the EntityHome generated by seam-gen with selectOneMenu  like this:


  | <h:selectOneMenu value="#{companyHome.instance.state}"
  |    converter="#{converters.stateConverter}">
  |   <s:selectItems value="#{stateList.resultList}" var="state"
  |      label="#{state.name}" noSelectionLabel="Please Select..."
  |     hideNoSelectionLabel="true" />
  | </h:selectOneMenu>
  | 


But when I try to use the same technique with a Collection, it throws an exception:


  | 
  | 16:48:36,828 ERROR [D2DFaceletViewHandler] Problem in renderResponse: Argument is not an array
  | java.lang.IllegalArgumentException: Argument is not an array
  |         at java.lang.reflect.Array.getLength(Native Method)
  |         at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.isSelected(MenuRenderer.java:454)
  |         at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.renderOption(MenuRenderer.java:310)
  |         at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.renderOptions(MenuRenderer.java:444)
  |         at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.renderSelect(MenuRenderer.java:376)
  |         at com.icesoft.faces.renderkit.dom_html_basic.MenuRenderer.encodeEnd(MenuRenderer.java:117)
  |         at com.icesoft.faces.component.ext.renderkit.MenuRenderer.encodeEnd(MenuRenderer.java:51)
  |         at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
  |         at org.jboss.seam.ui.JSF.renderChild(JSF.java:179)
  |         at org.jboss.seam.ui.JSF.renderChildren(JSF.java:162)
  |         at org.jboss.seam.ui.UIDecorate.encodeChildren(UIDecorate.java:178)
  |         at com.icesoft.faces.renderkit.dom_html_basic.DomBasicRenderer.encodeParentAndChildren(DomBasicRenderer.java:341
  | )
  |         at com.icesoft.faces.renderkit.dom_html_basic.GridRenderer.encodeChildren(GridRenderer.java:197)
  |         at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:582)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.application.D2DViewHandler.renderResponse(D2DViewHandler.java:586)
  |         at com.icesoft.faces.facelets.D2DFaceletViewHandler.renderResponse(D2DFaceletViewHandler.java:276)
  |         at com.icesoft.faces.application.D2DViewHandler.renderView(D2DViewHandler.java:149)
  |         at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
  |         at com.icesoft.faces.webapp.xmlhttp.PersistentFacesServlet.service(PersistentFacesServlet.java:402)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
  |         at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57)
  |         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.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:595)
  | 

My question is, is it not possible to use the generated entity homes like so:


  | <h:selectOneMenu value="#{companyHome.instance.states}"  
  |    converter="#{converters.stateConverter}">
  |   <s:selectItems value="#{stateList.resultList}" var="state"
  |      label="#{state.name}" noSelectionLabel="Please Select..."
  |     hideNoSelectionLabel="true" />
  | </h:selectOneMenu>
  | 

if states is a Collection?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4028950#4028950

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4028950



More information about the jboss-user mailing list