struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Puneet Lakhina" <>
Subject Re: RePopulating EditScreen with ActionForm Data
Date Mon, 21 Aug 2006 19:43:32 GMT
On 8/22/06, Mississippi John Hurt < > wrote:
> Hi,
> What's the best way to do this?
> User finished an edit screen, formaction is populated, and info is
> displayed
> on a ReviewInfo page.
> User clicks "go-back-edit" goes back to the editscreen, but now data is
> gone.
> So how should I fix this? Is the best way to put hidden properties for the
> form on the review page, thus if user clicks boBackEdit, it will
> repopulate
> the edit screen?  If I put the values in hidden fields, then what if they
> have special chars like (<,>,&,etc)? How to escape them so they dont screw
> up html, and how to unescape them when read them back (is that necessary)?
> Or is it better to, at the edit screen, after user continues, copy
> formaction data to a modelbean, put modelbean in session?
> Dont know whats best but this is something that would probably work.
Now assuming you are going to the ReviewInfo page using a forward from the
action to which your page that collects information submits, you could have
something like this in ur ReviewInfo.jsp

<bean:define id="formBean" name="formBean" scope="request" />
<a href="/editScreen.jsp">Go BAck to Edit </a>

and submit this form using the back to edit button. WHat this will
essentially do is copy the bean for the next request, which should then
populate your editScreen.jsp
Try this out, I think it shoudl work.

For escaping your could use this in ur formbean setter methods or the action

Hope this helps


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message