1 Reply Latest reply on Dec 28, 2007 7:59 AM by eee eee

    rich:subtable render bug?

    eee eee Newbie

      Hi all, i have a checkbox that controls a subtable rendering, after render the subtable when i try to hide the subtable a nullpointer exception is thrown

      <rich:dataTable id="table" value="#{process260WFBean.list}" var="item" >
      
      <rich:column >
       <f:facet name="header">
       <h:outputText value="Anulate" />
       </f:facet>
       <h:commandLink actionListener="#{process260WFBean.selectDetail}" action="#{process260WFBean.cancel}" immediate="true">
       <f:attribute name="idOper" value="#{item.id}" />
       <h:outputText value="*"></h:outputText>
       </h:commandLink>
      </rich:column>
      <rich:column>
       <f:facet name="header">
       <h:outputText value="Created date" />
       </f:facet>
       <h:commandLink actionListener="#{process260WFBean.selectDetail}" action="go" immediate="true">
       <f:attribute name="idBank" value="#{item.id}" />
       <h:outputText value="#{item.createdDate}"></h:outputText>
       </h:commandLink>
      </rich:column>
      
      
      <rich:column>
       <f:facet name="header">
       <h:outputText value="Type"/>
       </f:facet>
       <h:outputText value="#{tecnalis:getDescription('operation_type',item.type, configuration.language)}"></h:outputText>
      </rich:column>
      <rich:column>
       <f:facet name="header">
       <h:outputText value="Description"/>
       </f:facet>
       <h:outputText value="#{item.description}"></h:outputText>
      </rich:column>
       <rich:subTable id="table2" value="#{item.movements}" var="item2" rendered="#{process260WFBean.detail}">
       <t:column width="50%">
       </t:column>
       <t:column align="right">
       <h:outputText value="#{tecnalis:getDescription('balance_type',item2.balanceType, configuration.language)}"></h:outputText>
       </t:column>
       <t:column align="right">
       <h:outputText value="#{item2.amount}"></h:outputText>
       </t:column>
       <t:column align="right">
       <h:outputText value="#{tecnalis:getDescription('currency',item2.currency, configuration.language)}"></h:outputText>
       </t:column>
       <t:column align="right">
       <h:outputText value="#{item2.rollingBalance}"></h:outputText>
       </t:column>
       </rich:subTable>
      <f:facet name="footer">
      
      </f:facet>
      </rich:dataTable>
      View Movements<h:selectBooleanCheckbox id="ss" value="#{process260WFBean.detail}" />
      


      And the exception thrown

      11:11:53,006 ERROR [STDERR] 28-dic-2007 11:11:53 com.sun.facelets.FaceletViewHandler handleRenderException
      GRAVE: Error Rendering View[/gms/templates/components/operation_260.jsp]
      java.lang.NullPointerException
       at org.apache.el.lang.FunctionMapperImpl$Function.writeExternal(FunctionMapperImpl.java:123)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at java.util.HashMap.writeObject(HashMap.java:1001)
       at sun.reflect.GeneratedMethodAccessor389.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
       at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at org.apache.el.lang.FunctionMapperImpl.writeExternal(FunctionMapperImpl.java:74)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at org.apache.el.ValueExpressionImpl.writeExternal(ValueExpressionImpl.java:256)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at com.sun.facelets.el.TagValueExpression.writeExternal(TagValueExpression.java:128)
       at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1421)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1390)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
       at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
       at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1338)
       at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1146)
       at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
       at com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:244)
       at javax.faces.render.ResponseStateManager.writeState(ResponseStateManager.java:155)
       at com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:298)
       at org.ajax4jsf.application.AjaxStateManager.writeState(AjaxStateManager.java:208)
       at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:605)
       at org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
       at org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
       at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
       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:179)
       at org.jboss.web.tomcat.service.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:87)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
       at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
       at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
       at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.
      11:11:53,022 ERROR [STDERR] apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:619)
      


        • 1. Re: rich:subtable render bug?
          eee eee Newbie

          I found the problem but I dont know why...

          The problem was with the tag tecnalis:getDescription when the value list is null, if I call directly the value insted of getting the description of the value it works.

          getDescription method returns a String representing the code value.

          Which could be the problem?

          Thanks in advance,

          Rodrigo