2 Replies Latest reply on Jul 11, 2011 11:05 AM by vsankar13

    <rich:columnGroup rendered attribute fails and leads to javax.el.PropertyNotFoundException

    vsankar13

      Hi I am getting the " javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier" when I use render attribute at <rich:columnGroup rendered="#{varFromMainTable.MainTableObject.showSecondSubTable}"> 

      Following is my requirement and the approach am using:

      I have a data table inside a data table .And  I will get the sub table using few attributes/data from main table.

      For this, in the main data table object, I have a flag to show or not to show sub table.

      So now My xhtml looks like this.

       

      <rich:dataTable value="#{myBean.myList}" var="mainRow" binding="#{myBean.myTblBinding}" rowKeyVar="index" >

      <rich:columnGroup>

              <rich:column>

                  <h:outputText value="#{mainRow.mainRowDataValue}" />

              </rich:column>

       

       

          <rich:columnGroup rendered="#{mainRow.showSecondTable}">

              <rich:column colspan="11(main table no of cols)">

       

              <rich:dataTable value="#{mainRow.secondTableList}" var="secondtableRow">

              <rich:column>

                  <h:outputText value="#{secondtableRow.secondRowDataValue}" />

              </rich:column>

              </rich:dataTable>

       

              </rich:column>

          </rich:columnGroup>

       

      </rich:columnGroup>

      </rich:dataTable>

       

      When I use like this am getting  javax.el.PropertyNotFoundException: ELResolver cannot handle a null base Object with identifier mainRow

       

      If I remove render condition at column group and and put it at second data table, its working fine but getting an empty row displayed on the UI.

       

      --I even tried to initialize main list and populate few dummy objects in that list.. in the getter method of the main list.... but still same issue..

       

      If any one have the same issue before please let me know.. By the way we are using RichFces 3.3.2 version with Tomcat 6.0.29

       

      More info: But the same above structure is working fine with RichFces 3.3.2 version with Tomcat 5. Because Tomcat 5 will not come with built in EL-API jar, so in case of Tomcat 5 we need to place el jar specifically.

       

      -- with Tomcat 6 we tried to replace el jar with the one we used in Tomcat 5, but its leading to other server issues and not even getting  up Tomcat.

       

      Can any one suggest me a solution or workaround for this.

        • 1. Re: <rich:columnGroup rendered attribute fails and leads to javax.el.PropertyNotFoundException
          vsankar13

          Same thing is working in Tomcat 6.0.20 version.

           

          What is wrong with Tomcat 6.0.29 with EL API jar..?

          • 2. Re: <rich:columnGroup rendered attribute fails and leads to javax.el.PropertyNotFoundException
            vsankar13

            I have got work around for this.

             

            Now the second table can be done like this:

             

            <rich:dataTable value="#{myBean.myList}" var="mainRow" binding="#{myBean.myTblBinding}" rowKeyVar="index" >

            <rich:columnGroup>

                    <rich:column>

                        <h:outputText value="#{mainRow.mainRowDataValue}" />

                    </rich:column>

             

             

                <rich:columnGroup

            rendered="#{mainRow.showSecondTable}"

            rendered="#{myBean.myList[mainRow].showSecondTable}">

                    <rich:column colspan="11(main table no of cols)">

             

                    <rich:dataTable value="#{mainRow.secondTableList}" var="secondtableRow">

                    <rich:column>

                        <h:outputText value="#{secondtableRow.secondRowDataValue}" />

                    </rich:column>

                    </rich:dataTable>

             

                    </rich:column>

                </rich:columnGroup>

             

            </rich:columnGroup>

            </rich:dataTable>

             

             

            and in my bean looks like this:;

             

              private HtmlDataTableBinding dataTableBinding;

              private int mainRow;

             

            public int getMainRow(){

            int rowIndex = this.getDataTableBinding.getRowData().getRowIndex;

            if(rowIndex=-1){

            this.setMainRowIndex=0

            } else

               this.setMainRowIndex = rowIndex;

             

            return this.mainRow;

            }

             

             

            If anyone looks at a better workaround or perfect solution from Tomcat el jar point of view, please do let me know. I keep going with this for now