0 Replies Latest reply on Nov 30, 2010 11:49 PM by Pradeep Nayak

    Error using      <rich:columnGroup>

    Pradeep Nayak Newbie

      Hi  When I use column group I get an error.

      Im using richfaces 4 M4.

      XHTML is as follows ..

       

       

       

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

       

      <ui:composition xmlns="http://www.w3.org/1999/xhtml"
          xmlns:h="http://java.sun.com/jsf/html"
          xmlns:f="http://java.sun.com/jsf/core"
          xmlns:ui="http://java.sun.com/jsf/facelets"
          xmlns:a4j="http://richfaces.org/a4j"
          xmlns:rich="http://richfaces.org/rich">

       

          <f:view>
              <h:head>
                  <title>RichFaces Greeter</title>
                  <link rel="stylesheet" href="style.css" type="text/css" />
              </h:head>

       

              <h:body>
                  <h:form>

       

                      <rich:dataTable value="#{wonderBean.wonders}" var="wonder">
                          <rich:column colspan="3">
                              <f:facet name="header">Wonder</f:facet>
                              <h:outputText value="#{wonder.name}" />
                              <a4j:commandLink id="link" value="#{!wonder.show?'[+]':'[-]'}"
                                  reRender="link">
                                  <a4j:param name="val" value="#{!wonder.show}"
                                      assignTo="#{wonder.show}" />
                              </a4j:commandLink>
                          </rich:column>
                     
                      <rich:columnGroup>
                              <rich:column>
                                  <a4j:outputPanel ajaxRendered="true">
                                      <rich:dataTable value="#{wonder.details}" var="detail"
                                          rendered="#{wonder.show}" style="border: 0px">
                                          <rich:column>
                                              <f:facet name="header">Location</f:facet>
                                              <h:outputText value="#{detail.location}" />
                                          </rich:column>
                                          <rich:column>
                                              <f:facet name="header">Image</f:facet>
                                              <h:graphicImage value="#{detail.imageUrl}" />
                                          </rich:column>
                                      </rich:dataTable>
                                  </a4j:outputPanel>
                              </rich:column>
                         
                      </rich:columnGroup>
                      </rich:dataTable>
                     
                  </h:form>
              </h:body>
          </f:view>
      </ui:composition>

       

      When the page executes I get the following error.

       

      java.lang.NullPointerException: Argument Error: Parameter name is null
           com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startElement(HtmlResponseWriter.java:592)
           org.richfaces.renderkit.AbstractTableBaseRenderer.encodeColumnStart(AbstractTableBaseRenderer.java:86)
           org.richfaces.renderkit.AbstractTableBaseRenderer.encodeColumn(AbstractTableBaseRenderer.java:77)
           org.richfaces.renderkit.ColumnGroupRenderer.encodeRow(ColumnGroupRenderer.java:57)
           org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:62)
           org.richfaces.component.AbstractColumnGroup.walk(AbstractColumnGroup.java:69)
           org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:72)
           org.richfaces.renderkit.AbstractRowsRenderer.processRows(AbstractRowsRenderer.java:80)
           org.richfaces.renderkit.AbstractRowsRenderer.doEncodeChildren(AbstractRowsRenderer.java:98)
           org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:159)
           javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)
           org.richfaces.renderkit.DataTableRenderer.encodeRow(DataTableRenderer.java:183)
           org.richfaces.renderkit.AbstractRowsRenderer.process(AbstractRowsRenderer.java:62)
           org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:109)
           org.richfaces.component.UIDataAdaptor.walk(UIDataAdaptor.java:975)
           org.richfaces.renderkit.AbstractRowsRenderer.encodeRows(AbstractRowsRenderer.java:72)
           org.richfaces.renderkit.AbstractTableRenderer.encodeRows(AbstractTableRenderer.java:102)
           org.richfaces.renderkit.AbstractRowsRenderer.processRows(AbstractRowsRenderer.java:80)
           org.richfaces.renderkit.AbstractTableRenderer.encodeTableRows(AbstractTableRenderer.java:162)
           org.richfaces.renderkit.AbstractTableRenderer.doEncodeChildren(AbstractTableRenderer.java:209)
           org.richfaces.renderkit.RendererBase.encodeChildren(RendererBase.java:159)
           javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)
           javax.faces.render.Renderer.encodeChildren(Renderer.java:164)
           javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:849)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:1643)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)
           javax.faces.component.UIComponent.encodeAll(UIComponent.java:1646)
           com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:389)
           com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:127)
           javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:269)
           com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:117)
           com.sun.faces.lifecycle.Phase.doPhase(Phase.java:97)
           com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:135)
           javax.faces.webapp.FacesServlet.service(FacesServlet.java:309)


      Am I doing anything wrong ?
      When I remove the columngroup I dont get this error.
      But column group is necessary. Is there any workaround ?