I don't mind providing a patch if I can find the time. Can you narrow
down where in the code this could be occurring? Is it in the UIData
class directly, or some related class?

Thanks...

Frank Russo
Senior Developer
FX Alliance, LLC


-----Original Message-----
From: Mike Kienenberger [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 31, 2006 5:24 PM
To: MyFaces Discussion
Subject: Re: h:dataTable on an object containing a Set generated by
Hibernate

I'm ok with a patch that logs an error or throws an exception if the
backing collection isn't ordered.   The issue has come up a number of
times, and I think it'd be good if we made it easier for the end-user to
understand what's happening.

On 8/31/06, Frank Russo <[EMAIL PROTECTED]> wrote:
> BTW, there was no error generated or indication of a problem. Just an 
> empty table. To me, that is should be considered a bug. There should 
> have been something in the log or the screen to tell me that my 
> collection was not valid or something.
>
> I can log an issue if developers agree...
>
> Frank Russo
> Senior Developer
> FX Alliance, LLC
>
>
> -----Original Message-----
> From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 31, 2006 3:59 PM
> To: MyFaces Discussion
> Subject: Re: h:dataTable on an object containing a Set generated by 
> Hibernate
>
> Actually, the restriction is "ordered", not list.
> There needs to be a way to get from table row #12 back to backing item

> #12.
>
>
> On 8/31/06, Frank Russo <[EMAIL PROTECTED]> wrote:
> > I didn't realize that was a restriction.
> >
> > Thanks for the feedback...
> >
> > Frank Russo
> > Senior Developer
> > FX Alliance, LLC
> >
> >
> > -----Original Message-----
> > From: Mike Kienenberger [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 31, 2006 2:51 PM
> > To: MyFaces Discussion
> > Subject: Re: h:dataTable on an object containing a Set generated by 
> > Hibernate
> >
> > 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">&#160;</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
> > >
> >
> >
> >
> >
>
>
>
>



Reply via email to