struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpiser <jpi...@averoinc.com>
Subject Struts 2 client side validation and preparable interceptor?
Date Fri, 15 Feb 2008 15:03:20 GMT

I have a couple of questions regarding the preparable interceptor:
1. By implementing the preparable interface alone I can have my prepare()
method called before my action. Great, no problem. 

But If I want to utilize multiple prepare methods, e.g. prepareInput(),
prepareCreate(), etc.. that does not work unless I add interceptors to my
action like this:

<action name="userMgmt_*" method="{1}" class="pages.userMgmt">
	 <interceptor-ref name="params"/>
	 <interceptor-ref name="prepare"/>
	 <interceptor-ref name="basicStack"/>

            <result name="input">/pages/userMgmt/createUser.jsp</result>
	<result name="create">/pages/userMgmt/createUser.jsp</result>
	<result name="profile">/pages/userMgmt/profile.jsp</result>
</action>

however, at that point none of my client side validation works anymore in my
form in the JSP.

Can anyone explain to me why this is?  Am I missing something?	

What I am trying to do is have two JSPs, each with similiar forms that have
client side validation, that use the same action bean but call different
action methods and different prepare methods. The reason why I want to use
the same action bean is that all the parameters are the same and they are
both ultimately calling an update method that would be the same, so I do not
need two action beans that would have the same methods.

Thanks for any help you can give!

John
-- 
View this message in context: http://www.nabble.com/Struts-2-client-side-validation-and-preparable-interceptor--tp15502421p15502421.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Mime
View raw message