You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sashi Ravipati <Ra...@michigan.gov> on 2003/06/18 19:19:20 UTC
How to ignore validation when form loads (first time)
Hi
We have JSP pages which need user input. How can I display the form initially with out validation and then when user enters data and submits the page, the validation has to be done.
I tried to accomplish it by giving two <action> in Struts-Config.xml. as shown below
eg:
<action path="/AddRate" type="xxxx.AddRateAction" name="addRateForm" input="AddRate.jsp" scope="request" validate="false" >
<forward name="success" path="AddRate.jsp"/>
</action>
<action path="/Rate" type="xxxx.AddRateAction" name="addRateForm" input="AddRate.jsp" scope="request" validate="true" >
<forward name="success" path="AddRate.do?target=create"/>
</action>
Not sure if this the way to do. Can somebody tell me if there is a better way to accomplish this.
Thanks