UIData Iterators require an ordered list as a value. Sets are not
ordered. You'll need to convert your Sets into a List first -- List
list = new ArrayList(Set);
On 8/31/06, Frank Russo <[EMAIL PROTECTED]> wrote:
Has anyone tried the following:
I have an object that is managed by Hibernate. It contains a one-to-many
relationship implemented as a Set. Hibernate actually creates an
org.hibernate.collection.PersistentSet object. I have a
dataTable on that Set as follows:
<h:dataTable id="senderCompIDsTable"
var="compID"
value="#{participantBean.participant.senderCompIDs}"
>
<h:inputHidden id="senderParticipantID"
value="#{compID.key.participantID}"/>
<h:column id="selectColumn" rendered="#{false}">
<f:facet name="header"> </f:facet>
<h:selectBooleanCheckbox id="selectForDelete"
value="#{compID.active}" />
</h:column>
<h:column id="senderCompIDColumn">
<f:facet name="header">SenderCompID</f:facet>
<h:inputText id="senderCompID" value="#{compID.key.senderCompID}"/>
</h:column>
<h:column id="passwordColumn">
<f:facet name="header">Password</f:facet>
<h:inputSecret id="password" value="#{compID.password}"/>
</h:column>
<f:facet name="footer">
<h:commandButton
action="#{participantBean.addSenderCompID}"
styleClass="linkButton"
value="Add"
onmouseover="this.className='linkButtonHover'"
onmouseout="this.className='linkButton'"
/>
</f:facet>
</h:dataTable>
When the dataTable renders, there are no rows in the table, even though
there is at least one item in Set. The only row generated has one empty
column. The header row doesn't even render. I have an h:message tag on my
page, but no errors are showing there or in the log file. Something is not
right, but I can't track it down. I have this working on another screen with
similar objects without the one to many in the hibernate, so I'm wondering
if it has to do anything with the hibernate Set.
Has anyone worked with a similar configuration, or seen a problem like this?
If I'm not posting enough info, let me know what other info I can post.
Thanks...
Frank Russo
Senior Developer
FX Alliance, LLC
900 Third Avenue, 3rd Floor
New York, NY 10022
646.268.9949