You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2006/09/02 06:45:32 UTC

[jira] Commented: (STR-2864) Add actionId attribute to action mapping

    [ http://issues.apache.org/struts/browse/STR-2864?page=comments#action_38119 ] 
            
Paul Benedict commented on STR-2864:
------------------------------------

URL: http://svn.apache.org/viewvc?rev=439533&view=rev
Log:
STR-2864: FormTag to recognize actionId, plus any tags that can build URLs from an action

Modified:
    struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/TagUtils.java
    struts/struts1/trunk/taglib/src/main/java/org/apache/struts/taglib/html/FormTag.java

> Add actionId attribute to action mapping
> ----------------------------------------
>
>                 Key: STR-2864
>                 URL: http://issues.apache.org/struts/browse/STR-2864
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Core
>         Environment: Operating System: other
> Platform: Other
>            Reporter: Paul Benedict
>         Assigned To: Paul Benedict
>             Fix For: 1.3.6
>
>         Attachments: patch.txt, patch.txt, STR-2864.patch.txt, struts-config.xml
>
>
> Many times I need to redirect to another Struts actions. Recently I've come
> across the problem of needing to rename my action paths but this became a real
> nightmare to keep the action names as well as my redirect (forward) paths in
> synchronization.
> I propose adding an id attribute to the <action> tag so that it can be referred
> to in <forward> tags and its URL would be inferred, rather than be explicitly
> listed out. I find this proposal also to work well as a replacement for global
> forwards.
> <action id="viewJournal" path="/journal/view" ...>
>  ...
> </action>
> <action id="saveJournal" path="/journal/save" ...>
>   <forward name="success" path="id:viewJournal" redirect="true" />
> </action>

-- 
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