[jboss-user] [JBoss Seam] - Getting outjected object's attributes
ferd0
do-not-reply at jboss.com
Sun Nov 25 04:58:37 EST 2007
This is a siplified problem of mine. I would like to see, if I am doing anything conceptually wrog.
This is my object (simplified):
Hotel
| int nrOfStars;
| @OneToMany
| List<Room> rooms;
I outject an instance of this object (or I use it in statefull session bean), and I try to show it's attributes in xhtml.
But I can display hotel's nubmer of stars, but I can not access list of rooms, although they are present (in database). I add rooms with "hotel.getRooms().add(room)".
I see correct output of <h:outputText value="#{hotel.nrOfStars}" />, but I can't see proprely <h:outputText value="#{fn:length(hotel.rooms)}" /> (I get always "0").
How can I access a list of objects in my outjected object? It works if I outject the list itself, but not if i try to access the list "in outjected parent object".
I hope I've explained the problem properly.
Ferd0
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4107566#4107566
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4107566
More information about the jboss-user
mailing list