Meaningless Drivel is fun!
The moose likes Struts and the fly likes bean:write tag - query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:write tag - query" Watch "bean:write tag - query" New topic

bean:write tag - query

Achal Jalan

Joined: Nov 23, 2004
Posts: 21

In my struts project I am using a combination of the bean:write and other struts input tags.

If there is an error when a user inputs the data in all the fields and submits the form. The page is re-displayed with the error messages but the information that was being displayed by the bean:write tag dissapears.

Any help on how i can fix this, will be very appreciated.

A subsection of the code where I get the error 7 lines down

Thanks for all the help in advance
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
your 'review' object is lost because it was stored in the previous request. you need to display the 'customer name' by storing it IN the form-bean (in another form-property), place that in an html:hidden and retreive and simultaneously display that using the value from the form-bean (i forgot the exact bean:write syntax for retreiving form properties, but you can look that up. i think it's somewhere along the line bean:write name='' property='customerName').

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
Achal Jalan

Joined: Nov 23, 2004
Posts: 21
Thanks a bunch Alan... that solved it...
I agree. Here's the link:
subject: bean:write tag - query
jQuery in Action, 3rd edition