0

我在 ui:repeat 的多个 DataTables 中使用多个 selectBooleanCheckBox 时遇到了一些问题。

像这样的东西

<ui:repeat var="f" value="#{mybean.values}">
    <rich:dataTable value="#{f.values}" var="v">
        <rich:column>
            <h:selectBooleanCheckbox value="#{mybean.selected[v.id]}"/>
        </rich:column>
    </rich:dataTable>
</ui:repeat>

在 backing bean 中,在选定的地图中,我发现了错误的 id。

另一个奇怪的行为是,当我使用 sortBy 属性对列进行排序时,它会对所有呈现的列进行排序。

我在jira上找到了错误

RichFaces JIRA

如果我使用

<c:forEach />

标记而不是

<ui:repeat />

稍微好一点(表之间没有排序,支持 bean 中有更多值),但有时它仍然是错误的。

有任何想法吗?

谢谢,

4

2 回答 2

1

Try using the a4j:repeat.

I often have problems updating values on the backend using Richfaces from within ui:repeat (although normally with a4j:commandLink/commandButton).

EDIT: And do you have a well defined equals() and hashcode() for the Class that you are adding to the list/set?

于 2009-07-06T14:27:00.160 回答
0

我已经解决了对值进行排序的问题,因为我绑定到了一个 Set。我使用了 SortedSet。不管怎么说,还是要谢谢你。

于 2009-07-20T15:11:33.023 回答