views:

806

answers:

2

Hello, I'm having some problem using multiple selectBooleanCheckBox in multiple DataTables in ui:repeat.

Something like this

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

In the backing bean, in the selected map, I found the wrong ids.

Anothery strange behaviour is that when i sort the column using the sortBy attribute, it sorts all the column rendered.

I've found the bug on the jira

RichFaces JIRA

If I use the

<c:forEach />

tag instead of

<ui:repeat />

Is a little better (no sorting between tables, more values are right in the backing bean), but sometimes it's still wrong.

Any ideas?

Thanks,

+1  A: 

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?

Damo
Thank you very much for the advice, unfortunately it didn't solve the problem.
volothamp
Yes, I've defined it, but the problem is in richfaces, the values in the backing bean are wrong. It is more like a problem with the interation of the Extended Data Model, i think.
volothamp
A: 

I've resolved ordering the values, since I was binding to a Set. I've used the SortedSet. Thanks anyway.

volothamp