hi,
I'm using Struts 2 and Tiles 2 and have a problem concerning the form
validation.
If one action throws a validation error (because for example one form
field is empty) ALL other actions (which are part of the tiles template)
call the defined tiles definitions for the result "input" and not only
that action that throws the validation error. therefore my top module
jumps back to login mode if there is a validation error on the user's
profile page.
this is my *tiles.xml*:
<definition name="base.definition" template="/layouts/wmBoerseLayout.jsp">
<put-attribute name="module" value="/menu/module.action"/>
<put-attribute name="std_menu" value="/common/menu.jsp" />
</definition>
<definition name="page.user.profile" extends="base.definition">
<put-attribute name="body-content" value="/pages/profile.jsp"/>
</definition>
this is my* struts.xml*:
<action name="module" class="userAction" method="module">
<interceptor-ref name="myStack"/>
<result name="user">/modules/user.jsp</result>
<result name="admin">/modules/admin.jsp</result>
<result name="login">/modules/login.jsp</result>
<result name="input">/modules/login.jsp</result>
<result>/modules/login.jsp</result>
</action>
<action name="editProfile" class="profileAction" method="editProfile">
<result type="tiles">page.user.profile</result>
<result name="error" type="tiles">page.user.profile</result>
<result name="input" type="tiles">page.user.profile</result>
</action>
I would be glad if anyone could help!
Best regards,
Stefan