I don't have any straight instructions on when it's appropriate to commit code, and so I have provided a patch. If anyone wants to test it out, please feel free. It works well for me both on the ComposableRequestProcessor and the ol' RequestProcessor.

What's the next steps?

Paul
--- Begin Message ---
     [ http://issues.apache.org/struts/browse/STR-2864?page=all ]

Paul Benedict updated STR-2864:
-------------------------------

    Attachment: STR-2864.patch.txt

Attached is my patch. 

Discussion of patch:
http://mail-archives.apache.org/mod_mbox/struts-dev/200608.mbox/[EMAIL 
PROTECTED]

1) Added actionId attribute to action mapping (ActionConfig)
2) Modified PerformInclude and PerformForward
3) Added method to find ActionConfig by actionId in ModuleConfig
4) Added actionId -> URL resolution to RequestUtils
5) Backported for old RequestProcessor

> Add alias 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
>            Priority: Minor
>         Attachments: patch.txt, patch.txt, STR-2864.patch.txt
>
>
> 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

        



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

Reply via email to