Well, it is extremely unusual in a RESTful approach to have things like next and previous, since if I bookmarked the link and came back, I would have completely lost my orginal search parameters so next and last would be undefined.
You have two options: (1) include the search parameters as request parameters, in which case the list is easily reconstructed by requerying in the getHotel() method (and placed in the session scope only if you need to cache it) (2) "just hope" that the search results are sitting in the session already, which means that your bookmark will break if the user logs out. If you want to do this broken thing, what you should do is inject HotelListAction itself into HotelAction, and expose methods like getHotels(), next() and previous() on the HotelList interface. Basically, since HotelAction is stateless, you are tying yourself in knots by make it be the component responsible for managing motion through the list. Actually, if I was really trying to do (2), what I would do in practice is merge the two components back together into a single session-scope component, since then you would have easy access to all state you are interested in. But in practice, I would do (1). View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3923347#3923347 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3923347 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
