You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Richard T. Feak (JIRA)" <ji...@apache.org> on 2007/12/24 20:59:33 UTC

[jira] Created: (WW-2392) Handle additional actionName formats for ActionChainResult

Handle additional actionName formats for ActionChainResult
----------------------------------------------------------

                 Key: WW-2392
                 URL: https://issues.apache.org/struts/browse/WW-2392
             Project: Struts 2
          Issue Type: Improvement
          Components: Core Actions
    Affects Versions: 2.0.11
            Reporter: Richard  T. Feak
            Priority: Minor


Currently it's simple to define a chain result for an action in the same package, with a method of execute(). However, to chain to an action in a different namespace, or a method other then execute() requires additional XML markup that seems unnecessary.

We already have a defined string format for referring to namespaces and methods. Could we use that format to simplify the definition of chain results?

For example:
<result name="success" type="chain">foo!bar</result> - Should refer to the bar() method in action "foo" in the same namespace.
<result name="success" type="chain">/foo/bar</result> - Should refer to the "bar" action in the "foo" namespace
<result name="success" type="chain">/foo/bar!baz</result> - Should refer to the baz() method on the "bar" action" in the "foo" namespace.

As you can see, this format is much more intuitive and concise when compared against the current syntax for defining chain results.

I'm assuming that somewhere there is common code for parsing such strings. it should be easy to re-use that code to prepopulate the variables in the ActionChainResult correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2392) Handle additional actionName formats for ActionChainResult

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43985#action_43985 ] 

James Holmes commented on WW-2392:
----------------------------------

The "patch" looks good and I am all for simplifying configuration. This will have to be applied to XWork though as the ActionChainResult is part of that codebase.

> Handle additional actionName formats for ActionChainResult
> ----------------------------------------------------------
>
>                 Key: WW-2392
>                 URL: https://issues.apache.org/struts/browse/WW-2392
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.0.11
>            Reporter: Richard  T. Feak
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: SmartActionChainResult.java
>
>
> Currently it's simple to define a chain result for an action in the same package, with a method of execute(). However, to chain to an action in a different namespace, or a method other then execute() requires additional XML markup that seems unnecessary.
> We already have a defined string format for referring to namespaces and methods. Could we use that format to simplify the definition of chain results?
> For example:
> <result name="success" type="chain">foo!bar</result> - Should refer to the bar() method in action "foo" in the same namespace.
> <result name="success" type="chain">/foo/bar</result> - Should refer to the "bar" action in the "foo" namespace
> <result name="success" type="chain">/foo/bar!baz</result> - Should refer to the baz() method on the "bar" action" in the "foo" namespace.
> As you can see, this format is much more intuitive and concise when compared against the current syntax for defining chain results.
> I'm assuming that somewhere there is common code for parsing such strings. it should be easy to re-use that code to prepopulate the variables in the ActionChainResult correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2392) Handle additional actionName formats for ActionChainResult

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

James Holmes updated WW-2392:
-----------------------------

    Flags: [Patch]

> Handle additional actionName formats for ActionChainResult
> ----------------------------------------------------------
>
>                 Key: WW-2392
>                 URL: https://issues.apache.org/struts/browse/WW-2392
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.0.11
>            Reporter: Richard  T. Feak
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: SmartActionChainResult.java
>
>
> Currently it's simple to define a chain result for an action in the same package, with a method of execute(). However, to chain to an action in a different namespace, or a method other then execute() requires additional XML markup that seems unnecessary.
> We already have a defined string format for referring to namespaces and methods. Could we use that format to simplify the definition of chain results?
> For example:
> <result name="success" type="chain">foo!bar</result> - Should refer to the bar() method in action "foo" in the same namespace.
> <result name="success" type="chain">/foo/bar</result> - Should refer to the "bar" action in the "foo" namespace
> <result name="success" type="chain">/foo/bar!baz</result> - Should refer to the baz() method on the "bar" action" in the "foo" namespace.
> As you can see, this format is much more intuitive and concise when compared against the current syntax for defining chain results.
> I'm assuming that somewhere there is common code for parsing such strings. it should be easy to re-use that code to prepopulate the variables in the ActionChainResult correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (WW-2392) Handle additional actionName formats for ActionChainResult

Posted by "James Holmes (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43985#action_43985 ] 

jholmes edited comment on WW-2392 at 5/28/08 10:07 AM:
------------------------------------------------------------

The "patch" looks good and I am all for simplifying configuration. This will have to be applied to XWork though as the ActionChainResult class is part of that codebase.

      was (Author: jholmes):
    The "patch" looks good and I am all for simplifying configuration. This will have to be applied to XWork though as the ActionChainResult is part of that codebase.
  
> Handle additional actionName formats for ActionChainResult
> ----------------------------------------------------------
>
>                 Key: WW-2392
>                 URL: https://issues.apache.org/struts/browse/WW-2392
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.0.11
>            Reporter: Richard  T. Feak
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: SmartActionChainResult.java
>
>
> Currently it's simple to define a chain result for an action in the same package, with a method of execute(). However, to chain to an action in a different namespace, or a method other then execute() requires additional XML markup that seems unnecessary.
> We already have a defined string format for referring to namespaces and methods. Could we use that format to simplify the definition of chain results?
> For example:
> <result name="success" type="chain">foo!bar</result> - Should refer to the bar() method in action "foo" in the same namespace.
> <result name="success" type="chain">/foo/bar</result> - Should refer to the "bar" action in the "foo" namespace
> <result name="success" type="chain">/foo/bar!baz</result> - Should refer to the baz() method on the "bar" action" in the "foo" namespace.
> As you can see, this format is much more intuitive and concise when compared against the current syntax for defining chain results.
> I'm assuming that somewhere there is common code for parsing such strings. it should be easy to re-use that code to prepopulate the variables in the ActionChainResult correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2392) Handle additional actionName formats for ActionChainResult

Posted by "Richard T. Feak (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2392?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard  T. Feak updated WW-2392:
---------------------------------

    Attachment: SmartActionChainResult.java

It's not a patch or test, but may assist in moving this forward.

Here's the implementation that we are currently using to solve this issue. It's based on the 2.0.11 source of ActionChainResult. There are basically a dozen lines of code added at the beginning of the execute() method (other then the class rename). The goal was to add the functionality without changing the original interface. This enhancement should *not* break backwards compatibility at all.

Thanks for the consideration.

> Handle additional actionName formats for ActionChainResult
> ----------------------------------------------------------
>
>                 Key: WW-2392
>                 URL: https://issues.apache.org/struts/browse/WW-2392
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core Actions
>    Affects Versions: 2.0.11
>            Reporter: Richard  T. Feak
>            Priority: Minor
>             Fix For: Future
>
>         Attachments: SmartActionChainResult.java
>
>
> Currently it's simple to define a chain result for an action in the same package, with a method of execute(). However, to chain to an action in a different namespace, or a method other then execute() requires additional XML markup that seems unnecessary.
> We already have a defined string format for referring to namespaces and methods. Could we use that format to simplify the definition of chain results?
> For example:
> <result name="success" type="chain">foo!bar</result> - Should refer to the bar() method in action "foo" in the same namespace.
> <result name="success" type="chain">/foo/bar</result> - Should refer to the "bar" action in the "foo" namespace
> <result name="success" type="chain">/foo/bar!baz</result> - Should refer to the baz() method on the "bar" action" in the "foo" namespace.
> As you can see, this format is much more intuitive and concise when compared against the current syntax for defining chain results.
> I'm assuming that somewhere there is common code for parsing such strings. it should be easy to re-use that code to prepopulate the variables in the ActionChainResult correctly.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.