On 8/22/06, Mississippi John Hurt <[EMAIL PROTECTED] > 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
class

http://jakarta.apache.org/commons/lang/api/org/apache/commons/lang/StringEscapeUtils.html


Hope this helps

--
Puneet

Reply via email to