You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Raghuveer <ra...@infotechsw.com> on 2006/03/22 06:31:13 UTC

Actionform validate method

Is there a way to restrict the call to validate method.
In below example "manageaccount.jsp" will be loaded initially by calling
"ManageLoad.do" action mapping.
 validate=false  is set as i dont need and validation when page loads first
time.

But later when i submit the form ,i need to validate form data and throw any
ActionErrors in same page ,so i am calling "Manage".do"


Experts ,is there any other better way to resolve such issue in struts1.2.8
version.

---------------------------------------------------------------------------
		<action path="/Manage"
			type="com.cdutc.cdpw.cdacs.action.CManageAction" name="cManageForm"
			scope="request" input="/jsp/manageaccount.jsp" parameter="method"
			validate="true">
			<forward name="success" path="/jsp/manageaccount.jsp" />

		</action>
		<action path="/ManageLoad"
			type="com.cdutc.cdpw.cdacs.action.CManageAction" name="cManageForm"
			scope="request" parameter="method" validate="false">
			<forward name="success" path="/jsp/manageaccount.jsp" />


		</action>



---------------------------------
Raghuveer








---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: Actionform validate method

Posted by Laurie Harper <la...@holoweb.net>.
Raghuveer wrote:
> Is there a way to restrict the call to validate method.
> In below example "manageaccount.jsp" will be loaded initially by calling
> "ManageLoad.do" action mapping.
>  validate=false  is set as i dont need and validation when page loads first
> time.
> 
> But later when i submit the form ,i need to validate form data and throw any
> ActionErrors in same page ,so i am calling "Manage".do"
> 
> 
> Experts ,is there any other better way to resolve such issue in struts1.2.8
> version.
> 
> ---------------------------------------------------------------------------
> 		<action path="/Manage"
> 			type="com.cdutc.cdpw.cdacs.action.CManageAction" name="cManageForm"
> 			scope="request" input="/jsp/manageaccount.jsp" parameter="method"
> 			validate="true">
> 			<forward name="success" path="/jsp/manageaccount.jsp" />
> 
> 		</action>
> 		<action path="/ManageLoad"
> 			type="com.cdutc.cdpw.cdacs.action.CManageAction" name="cManageForm"
> 			scope="request" parameter="method" validate="false">
> 			<forward name="success" path="/jsp/manageaccount.jsp" />
> 
> 
> 		</action>
> ---------------------------------
> Raghuveer

What's the issue you need to resolve? The only thing I'd suggest from 
looking at the sample configuration above is that you might want to set 
your 'input' attribute to point to the /ManageLoad action instead of 
referencing the JSP directly, but without knowing what problem you want 
to solve I can't offer much more insight than that...

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org