Hi,
Am trying to implement "edit profile" screen.I have a tabbed panel.In one of the divs i have a
jsp form which takes these "edit profile" details.i have some default values populated from DB, after that user can change the values.i have validation xml for this action which is not getting called.that is am not able to do basic validations which am able to in other jsp pages.this is what i have in my struts.xml
<action name="doLogin" class="com.xyz.admin.Login">
<interceptor-ref name="params" />
<interceptor-ref name="validation" />
<interceptor-ref name="resourceInterceptor" />
<result name="input">/pages/login.jsp</result>
<result name="error">/pages/login.jsp</result>
<result name="superuserPage" type="redirect">
superuser.action
</result>
</result>
<result type="chain" name="adminPage">
<param name="actionName">doEditProfile</param>
</result>
<result>/pages/login.jsp</result>
</action>
<action name="doEditProfile" method="showData"
class="com.xyz.admin.EditProfile">
<interceptor-ref name="params" />
<interceptor-ref name="resourceInterceptor" />
<!-- <interceptor-ref name="validation" /> -->
<result name="input">/pages/login.jsp</result>
<result name="error">/pages/login.jsp</result>
<result>/pages/employeehomepage.jsp</result>
</action>
<action name="editProfile_save"
class="com.xyz.admin.EditProfile">
<interceptor-ref name="validation" />
<interceptor-ref name="params" />
<interceptor-ref name="resourceInterceptor" />
<result name="error">/pages/login.jsp</result>
<result>/pages/editProfileSuccess.jsp</result>
</action>
I have 2 methods in my action class.One for showing default data in the screen,other one is for saving the modified details to DB.
Can anyone help how to get the validations work from validation-xml
Regards,
Unaren