2 Replies Latest reply on May 26, 2010 8:31 AM by sathish avunoori

    rich:inplaceSelect problem

    sathish avunoori Newbie

      hi every one,

       

      i have a problem that,

       

      iam using rich:inplaceSelect in a page like this,

       

       

      <rich:inplaceSelect value="#{_voyageDelayDetail.icVoyageDelayReason}" rendered="true"

           requiredMessage="*    Description ::---- Value is Required."
           defaultLabel="#{messages['com.infyz.toms.messages.Click_here_to_select']}" layout="block"
           style="width:290px;" >
               <f:selectItems id="inp_sel_list" value="#{voyageDelayReasons}"></f:selectItems>

      </rich:inplaceSelect>

      and i am giving datamodel list  as selectItems (voyageDelayReasons). it was declared in my backing bean like this,

       

          @DataModel
           private List<IcVoyageDelayReason> voyageDelayReasons;
             
          
           @Factory
           public void getVoyageDelayReasons()
           {
               String qry = "select voyageDelayReason from IcVoyageDelayReason voyageDelayReason order by                                                                   voyageDelayReason.reasonCode asc";
              voyageDelayReasons = em.createQuery(qry).getResultList();
           }

      if i use <h:selectOneMenu> with <s:selectItems value="#{voyageDelayReasons}"like this

       

      <h:selectOneMenu layout="block" value="#{_voyageDelayDetail.icVoyageDelayReason}" required="true"
                                       requiredMessage="* Description ::----> Value is Required." style="width:290px;">
                                  <s:selectItems value="#{voyageDelayReasons}" var="reason" label="#{reason.description}" noSelectionLabel="#{messages['com.infyz.toms.messages.Click_here_to_select']}"/>
                                  <s:convertEntity />
                                  <a4j:support event="onclick" reRender="editCargoPosition" bypassUpdates="true"/>
                                  </h:selectOneMenu>

      it is working fine. But if i use <rich:inplaceSelect> with <f:selectItems value="#{voyageDelayReasons}" > it is giving an error like as follows

       

      SEVERE: Error Rendering View[/transportation_ocean/ItVoyageMasterEdit.xhtml]
      java.lang.IllegalArgumentException: Value 'org.jboss.seam.jsf.ListDataModel' of tag <selectItems> attribute is incorrect.
          at org.ajax4jsf.util.SelectUtils.getSelectItems(SelectUtils.java:101)
          at org.richfaces.renderkit.InplaceSelectBaseRenderer.prepareItems(InplaceSelectBaseRenderer.java:146)
          at org.richfaces.renderkit.html.InplaceSelectRenderer.doEncodeEnd(InplaceSelectRenderer.java:210)
          at org.richfaces.renderkit.html.InplaceSelectRenderer.doEncodeEnd(InplaceSelectRenderer.java:665)
          at org.ajax4jsf.renderkit.RendererBase.encodeEnd(RendererBase.java:134)
          at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:861)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:281)
          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
          at org.richfaces.renderkit.AbstractRowsRenderer.encodeCellChildren(AbstractRowsRenderer.java:288)
          at org.richfaces.renderkit.AbstractTableRenderer.encodeOneRow(AbstractTableRenderer.java:387)
          at org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:83)
          at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:101)
          at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:1133)
          at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:104)
          at org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:88)
          at org.richfaces.renderkit.AbstractTableRenderer.encodeTBody(AbstractTableRenderer.java:90)
          at org.richfaces.renderkit.AbstractTableRenderer.encodeChildren(AbstractTableRenderer.java:97)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:279)
          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
          at org.ajax4jsf.renderkit.html.AjaxOutputPanelRenderer.encodeChildren(AjaxOutputPanelRenderer.java:78)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
          at org.richfaces.renderkit.TabRendererBase.encodeChildren(TabRendererBase.java:113)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
          at org.ajax4jsf.renderkit.RendererBase.renderChild(RendererBase.java:277)
          at org.ajax4jsf.renderkit.RendererBase.renderChildren(RendererBase.java:258)
          at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:285)
          at org.richfaces.renderkit.html.TabPanelRenderer.doEncodeChildren(TabPanelRenderer.java:280)
          at org.ajax4jsf.renderkit.RendererBase.encodeChildren(RendererBase.java:120)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
          at javax.faces.render.Renderer.encodeChildren(Renderer.java:148)
          at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:837)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)
          at javax.faces.component.UIComponent.encodeAll(UIComponent.java:942)
          at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
          at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
          at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
          at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:109)
          at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
          at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
          at org.jboss.seam.web.IdentityFilter.doFilter(IdentityFilter.java:40)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:42)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
          at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
          at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
          at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
          at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:56)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
          at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
          at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
          at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
          at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
          at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
          at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
          at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
          at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
          at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
          at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
          at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
          at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
          at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
          at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
          at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
          at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
          at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
          at java.lang.Thread.run(Thread.java:636)

       

      can anyone help me where i am doing wrong?

       

      greate appreciation for your help in this