4 Replies Latest reply on Sep 6, 2012 8:31 AM by 959950

    Nested Dynamic h:datatable

      I also have similar issue with nesting of dataTables as stated in https://forums.oracle.com/forums/thread.jspa?messageID=10559636#10559636

      Can you please help on how the assign the binding value for the inner datatable as i have to add columns dynamically to it.

      <t:dataList binding="#{backingBean.outerDataTableGUI}" value="#{backingBean.outerTableArrayList}" var="outerRowData">
      <h:datatable binding="????????" value="#{outerRowData.innerTableArrayList}"> //*should be binding="#{outerRowData.innerDataTableGUI}"*
        • 1. Re: Nested Dynamic h:datatable
          should be binding="#{outerRowData.innerDataTableGUI}"
          So what happens when you do that?
          • 2. Re: Nested Dynamic h:datatable
            It throws below error when i use binding="#{outerRowData.innerDataTableGUI}"

            javax.servlet.ServletException: Error setting property 'innerDataTableGUI' in bean of type null
                 at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:658)
            • 3. Re: Nested Dynamic h:datatable
              Yeah, I can see why it's doing that, the bindings are all being evaluated at the same time so there is no iteration over the table values yet. Do you have to use bindings? It might be simpler to just use the value= attribute and ensure the backing bean has getters and setters for a suitable table, and it might also work with the nested table.
              • 4. Re: Nested Dynamic h:datatable
                I have to use binding inorder to add columns at runtime to the innerTable based on outerRowData

                I tried having a backing bean property for the inner table as below:

                return   innerTableGui =( (OuterTableRowData)getOuterTableGui().getRowData()).getInnerTableGui();

                problem is it is getting called onlyonce..and the first row data is applied to all other rows.