[jboss-user] [JBoss Seam] - Re: how is DataModelSelection populated

bfo81 do-not-reply at jboss.com
Tue Jul 11 08:41:43 EDT 2006


You have a List annotated with @DataModel (here: private List hotels). This list is being used as the <h:dataTable>'s value.

Seam is integrated into the JSF lifecycle so well, that every time a link in a table row is clicked, Seam populates the DataModelSelection property (here: private Hotel selectedHotel) with the corresponding object represented in that table row.

Well, and hotelBooking then just accesses this property of hotelSearching.

btw: I would like to know if it's really necessary to pass the hotelSearching bean to the hotelBooking bean. I would prefer passing the selected hotel directly instead of resolving it via hotelSearch.getSelectedHotel(). In my opinion the way it's done now increases coupling of the classes (HotelBooking needs Hotel AND HotelSearching) and that's a bit unaesthetic.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956975#3956975

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3956975



More information about the jboss-user mailing list