How can I get acces from rich:columns to rich:datatable's "var" on JSP page (JSF 1.2)?

691 Views Asked by At

Code of JSP page

<rich:dataTable id="journalTable" value="#{sessionBean.currentPageDataList}"
                        var="row" >

            <rich:columns value="#{row}"  var="column">
                <f:facet name="header">
                        <h:outputText value="#{column}"/>
                </f:facet>
                <h:outputText value="#{column}"/>
            </rich:columns>

        </rich:dataTable>

I need to get "var" from dataTable because it creates from array of lists

List[] list = new ArrayList()[];

It looks similar to the two dimensional array and nested loops.

How can I get the access? or maybe there exsist another way?

1

There are 1 best solutions below

1
On

Datatable's var is one list of array of lists. Columns var creates by implicit foreach, used on this list and each element of list goes to each cell from current rom. This is the mechanism. The task is to find way to use datatable's var in the columns block, using jsf 1.2 Earlier I use jsf 2.1 and I didn't have such problems. The way was to pass parameter in method call. But. There's no way to do it as I understand.