File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Spring in Action
this week in the
Struts validation redirection
Joined: Jan 24, 2005
Feb 22, 2005 15:57:00
I am validating a form.
When the form is redirected to itself upon validation failure(with validation error messages) does not redirected to the proper page it came from.
(1) Page before Validation : ../MyWeb/CapDisplay.do?featureMode=sign
(2) Page After Validation : ../MyWeb/CapDisplay.do
Due to this, the redirected page displays few editable fields as uneditable fields. (Because, when (2) is in the URL few fields are suppose to be Uneditable as per my requirement)
How do I fix this?
Thx in Advance!
Joined: Feb 15, 2005
Feb 22, 2005 22:18:00
Your best bet in this case is to include a hidden field with the name featureMode in your page to make sure the parameter is carried through subsequent calls to the page.
You'd also want to add the property featurMode to your form bean. Make sure that for this particular page, you set the property value to "sign" Then add the following:
<html:hidden name="myForm" property="featureMode" />
This way the parameter will be set properly when the page is redisplayed by errors in the validate() method.
I agree. Here's the link:
subject: Struts validation redirection
Displaying error in multi page form.
Form Validation and Delete using struts
Browser Back button handling wusing spring
Stopping the struts validation for a particular non-displayed fields
DynaValidatorForm not redisplaying scoped variables
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014