Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yariel,

I have a page validated with Validation Framework, but I can get that
page from two diferent jsp inputs. When an error ocurs, the validator
always turn me back to the same jsp input (the one especified) not
matter which was the selected input. It is possible to set two values
to "input" attribute in an ActionMapping?? Is there any other way to
do something like that??


Generally, this is done with two separate ActionMappings, like this:

<!-- submit to here from first.jsp -->
<action path="/path1"
    type="MyAction"
    name="MyFormBean"
    validate="true"
    scope="request"
    input="/first.jsp">
  ...
</action>

<!-- submit to here from second.jsp -->
<action path="/path2"
    type="MyAction"
    name="MyFormBean"
    validate="true"
    scope="request"
    input="/second.jsp">
  ...
</action>

You are doing the exact same thing in both cases, except that the
"input" attributes are different. The validation should be the same,
using the same form bean, etc.

Yep; the other option is to set validate to false and call it manually, then return the appropriate mapping in your action's execute, but the above solution is probably easier.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to