6 Replies Latest reply on Apr 6, 2010 9:16 AM by Sunay Shah

    NullPointerException + UIExtendedDataTable + Grouping Column

    Sunay Shah Apprentice
      Hello All,
      I get the nullpointer exception when i dynamically assign the grouping column.



      java.lang.NullPointerException
           org.richfaces.component.UIExtendedDataTable.beforeRenderResponse(UIExtendedDataTable.java:423)
           org.ajax4jsf.component.RenderPhaseUIDataAdaptorVisitor.beforeComponent(RenderPhaseUIDataAdaptorVisitor.java:44)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:47)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
           org.richfaces.event.RenderPhaseComponentListener.processComponents(RenderPhaseComponentListener.java:55)
           org.richfaces.event.RenderPhaseComponentListener.beforePhase(RenderPhaseComponentListener.java:71)
           org.ajax4jsf.component.AjaxViewRoot.processPhaseListeners(AjaxViewRoot.java:185)
           org.ajax4jsf.component.AjaxViewRoot.encodeBegin(AjaxViewRoot.java:502)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:928)
           com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:592)
           org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:100)
           org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:176)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:110)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
           com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
           org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
           org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
           org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
           org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
           org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      I am using 3.3.1 GA, I am also applying sortColumn and sortingOrder Dynamically.

      Please suggest the solution , FYI I gone throught the ExtendedDataTable class and i found the following if condition
      is creating the problem
      if   (groupingColumn.getSortOrder().equals(Ordering.UNSORTED)) {

      groupingColumn.setSortOrder(Ordering.ASCENDING);

      }


       

      Thanks

      Sunay