struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton (JIRA)" <j...@apache.org>
Subject [jira] Commented: (STR-2956) Strongly typed forms in Action dispatching
Date Wed, 04 Oct 2006 11:45:16 GMT
    [ http://issues.apache.org/struts/browse/STR-2956?page=comments#action_38324 ] 
            
Niall Pemberton commented on STR-2956:
--------------------------------------

I'm not sure I agree that this is a good idea. Seems to me keeping the framework simple is
best, especially as the gain in this situation is only saving a one line cast. I could also
imagine people then expecting that if the method is defined with a super class that it should
also work with sub-classes - which if we tried to handle would get more complicated and if
we don't will probably generate questions on the user list asking why their Action's method
can't be found.

Also isn't there a potential backwards compatibility issue if people have already used strongly
typed methods in their DispatchAction - they will suddenly find these being called directly,
rather than the original method using ActionForm? I guess this could be overcome by checking
for a method defined using ActionForm first, before looking for strongly typed methods.

I don't use DispatchActions, but if I did I wouldn't find this very helpful since most of
my actions cast to a DynaBean - using DynaBean in the method means I'm not tied to an implementation
for accessing property values, but also if I want to use any of the ActionForm's convenience
methods they're also available through the form parameter passed to the method.

> Strongly typed forms in Action dispatching
> ------------------------------------------
>
>                 Key: STR-2956
>                 URL: http://issues.apache.org/struts/browse/STR-2956
>             Project: Struts 1
>          Issue Type: Improvement
>    Affects Versions: 1.0 Final
>            Reporter: Paul Benedict
>             Fix For: 1.3.6
>
>
> Actions always cast a form into the intended subclass. It would be nice to allow the
the dispatch classes to match up against the strongly typed methods. Example:
> private ActionForward doMyAction(ActionMapping mapping, MyForm form, HttpServletRequest
request, HttpServletResponse response);

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

        

Mime
View raw message