[ http://issues.apache.org/struts/browse/WW-770?page=all ]

tm_jee reassigned WW-770:
-------------------------

    Assign To: tm_jee

> Validation should be aware of namespace that action lives in
> ------------------------------------------------------------
>
>          Key: WW-770
>          URL: http://issues.apache.org/struts/browse/WW-770
>      Project: Struts Action 2
>         Type: Improvement

>   Components: Actions, Misc
>     Versions: WW 2.1.7
>     Reporter: Alex Shneyderman
>     Assignee: tm_jee
>     Priority: Trivial
>      Fix For: 2.0

>
> Currently validation forum is unaware of the namespace that the action lives 
> in. It is extremly useful to enable this awarnese, whne actions are being 
> reused and are named exactly the same way in different namespaces. Say we 
> have an application that is editing a few different entityes. We write one 
> generic Save action. We configure pacakges like so:
> <package name="com.mycompany.entity1" namespace="/section/entity1">
>    <action name="save" class="com.mycompany.actions.Save" />
> </package>
> <package name="com.mycompany.entity2" namespace="/section/entity2">
>    <action name="save" class="com.mycompany.actions.Save" />
> </package>
> to access the actions from the web one would submit the URL 
> /ctx/section/entity1/save.action or /ctx/section/entity2/save.action to save 
> entity1 or entity2. Validation however is different for 
> each of the entities and there is no way to specify validation file that will 
> differentiate 
> between the two saves. Note also that changing the name of the save action is 
> not desitrable, 
> since if you have some kind of automation script to generate the URL you want 
> the config to 
> be as uniform as possible.
> what would be useful is if we could specify validation files for save like so:
> Save-%section%entity1-validation.xml 
> and
> Save-%section%entity1-validation.xml
> here is a releveant discussion of the forum:
> http://forums.opensymphony.com/thread.jspa?threadID=1595&tstart=0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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

Reply via email to