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 _______________________________________________ jboss-user mailing list [email protected] https://lists.jboss.org/mailman/listinfo/jboss-user
