1 Reply Latest reply on Nov 30, 2009 3:11 AM by ataylor

    List/dataTable local vars unaccessable

    akaine

      Hello

      I have a problem accessing local variables I maped my lists to inside a 4 livel list structure similar to this: List<List<List<List>>> areas

      Here goes an example of a dynamic tables list I want to generate:

      <rich:dataList value="#{mbean.areas}" var="area" rowKeyVar="areaIdx" >
       <h:outputText value="#{area.nombre}" />
       <rich:dataTable value="#{area.registries}" rowKeyVar="row" var="registry" >
       <rich:column>
       <f:facet name="header">
       <h:outputText value="Registry" />
       </f:facet>
       <h:outputText value="#{registry.description}" />
       </rich:column>
       <rich:columns value="#{registry.columns}" var="column" index="col">
       <f:facet name="header">
       <h:outputText value="#{column.descripcion}" />
       </f:facet>
       <rich:dataList value="#{column.items}" var="item">
       <h:outputText value="#{item.descripcion}" />
       </rich:dataList>
       </rich:columns>
       </rich:dataTable>
      </rich:dataList>


      While RichFaces sees registry var (the first static column renders well) when I try to generate columns with it RF refuses to generate any giving me ERROR [ColumnsHandler] FOREACH_BAD_ITEMS exception, which means rich:columns does not recognizes any value inside the registry var.

      Observations:
      - exactly the same happens if I put mbean.areas[areaIdx].registries[row].columns as rich:columns value.
      - if I put a columns directly as an mbean property (by declaring it in mbean previously of course) it works, still this is worthless in my case because I can't avoid 4 level list structure.
      - I print the whole structure out in the console and all objects are in place, it's a RF problem.

      Any ideas why this happens?
      Any suggestions how could I solve this?

      Thanks