12 Replies Latest reply on Apr 7, 2010 3:06 AM by liuliu

    Problem with <rich:columns> driving me insane

    wormdundee

      So I have a datatable with a nested datatable inside it. Inside the nested datatable is a <rich:columns> tag like so:

      <rich:dataTable id="steps" value="#{travelerHandler.steps}" var="step" border="1">
       <f:facet name="header">
       <h:outputText value="#{travelerHandler.trav.name}" />
       </f:facet>
       <rich:subTable>
       <rich:columns value="#{step.tests}" var="test">
       <f:facet name="header">
       <h:outputText value="#{test.test.name}" />
       </f:facet>
       <h:outputText value="#{test.results.passStatus}" />
       <h:outputText value="#{test.results.comment}" />
       </rich:columns>
       </rich:subTable>
       </rich:dataTable>


      travelerHandler.steps is an ArrayList of StepTests. A StepTest has a Step within it, as well as an ArrayList of TestWithResults. As you can see I am trying to use this ArrayList of TestWithResults to dynamically set the columns, as each Step has a different amount of columns within it.

      For some reason, trying to run this gives me the error jspTagException: FOREACH_BAD_ITEMS on the line <rich:columns value="#{step.tests}" var="test">, I don't see why this is, as its just an ArrayList, nothing special. I also attempted to wrap it in a DataModel but that resulted in the same error.

      Any help would be much appreciated.