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 Wallace (JIRA)" <ji...@apache.org> on 2008/08/15 04:58:25 UTC

[jira] Commented: (WW-1865) Simplify Result Type Annotation by allowing same result types as XML configuration

    [ https://issues.apache.org/struts/browse/WW-1865?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=44564#action_44564 ] 

Richard Wallace commented on WW-1865:
-------------------------------------

I disagree that this is would be a good thing.  The nice thing about having the configuration information in the java code is being able to use the type safety of the language.  Going back to using a far weaker string naming convention to wire things together is a step backwards sliding us back towards the same problems as xml has in the first place.  But, as long as it's not required I can't say I really care if the option is there.

> Simplify Result Type Annotation by allowing same result types as XML configuration
> ----------------------------------------------------------------------------------
>
>                 Key: WW-1865
>                 URL: https://issues.apache.org/struts/browse/WW-1865
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Plugin - CodeBehind
>    Affects Versions: 2.0.6
>            Reporter: Alex  Kira
>            Assignee: James Holmes
>            Priority: Minor
>             Fix For: Future
>
>
> When using Result annotations, we currently have to use class references to configure the result type.  It would be much simpler and more consistent if we can use the same result types as the XML configuration, such as "redirect-action", "tiles", etc, instead of having to use class names like ServletActionRedirectResult .class and TilesResult.class. 
> So instead of this:
> @Result(name="success", value="main", type=ServletActionRedirectResult .class)
> public class HomeAction extends ActionSupport {
>     // ...
> }
> Be able to do this:
> @Result(name="success", value="main", type="redirect-action")
> public class HomeAction extends ActionSupport {
>     // ...
> }
> or if we are keeping backwards compatiblity, something like this:
> @Result(name="success", value="main", typeName="redirect-action")
> public class HomeAction extends ActionSupport {
>     // ...
> }

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