0

JSP页面代码

<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>

我需要从 dataTable 中获取“var”,因为它是从列表数组创建的

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

它看起来类似于二维数组和嵌套循环。

我怎样才能获得访问权限?或者也许存在另一种方式?

4

1 回答 1

0

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.

于 2013-07-19T06:52:30.910 回答