Hello,
I'm using Stripes 1.5 Beta on Java 6.
The general pattern I've been following in the application is that every
ActionBean has a view() method which is annotated with the
@DefaultHandler annotation, and the view() method is responsible for
populating the ActionBean with anything needed to display the page.
Usually the view() method has to grab some data from the database for
the page to be displayed.
This has worked well so far but I've run into a problem. I have a page
that has a few text boxes and a drop-down select box. The List that
populates the select box is retrieved from the database by the view()
method. When a @Validation fails, the text boxes are populated
correctly (with the information, right or wrong, that the user entered)
but the select box is empty and has no options -- obviously the view()
method did not have chance to repopulate the list on the ActionBean.
How do I get around this? In the old Struts 1.x world (blah), a Tiles
controller backed every JSP and was responsible for populating the page
with info from a database.
Is my pattern of having every ActionBean with a view() method a poor
pattern?
I'm wondering if the <stripes:useActionBean> tag is what I need to use,
but I'm not sure how I should fit everything together.
Thanks!!
-Ryan
This e-mail message is being sent solely for use by the intended recipient(s)
and may contain confidential information. Any unauthorized review, use,
disclosure or distribution is prohibited. If you are not the intended
recipient, please contact the sender by phone or reply by e-mail, delete the
original message and destroy all copies. Thank you.
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users