--- Steve Raeburn <[EMAIL PROTECTED]> wrote:
> > I thought the whole point was that there would be only one forward
> > and the action would always forward to that forward?  In that case,
> > you could count on using the first one.
> 
> Just thinking that if an anonymous/default ActionForward were allowed,
> then
> it could also be useful for other actions. In any case, it's better not
> to
> allow a situation where the behaviour is unspecified.
> 
> >> You'd probably need to add a method such as getDefaultForward()
> >> to retrieve it.
> >
> > This part seems to be adding complexity to something which was meant
> > to be very simple.
> 
> I think it might actually be possible to reduce the visible complexity
> by
> doing that. e.g.
> 
>   <action path="/myAction"
>           type="org.apache.struts.actions.SuccessAction">
>       <forward path="/myPage.jsp"/>
>   </action>
> 
> SuccessAction may not now be best name, but let's stick with it for the
> moment.
> 
> To be really radical, we could absorb the behaviour into Action, and
> have it
> check for a default ActionForward and use that, if found. That way
> there's
> no need for a SuccessAction at all. Then you could just do:
> 
>   <action path="/myAction"
>           type="org.apache.struts.action.Action">
>       <forward path="/myPage.jsp"/>
>   </action>
> 
> If Action actually does something useful, could we go crazy and default
> the
> type as well?
> 
>   <action path="/myAction">
>       <forward path="/myPage.jsp"/>
>   </action>

There is a simpler way of doing that:
<action path="/myAction" forward="/myPage.jsp"/>

The only benefit of SuccessAction was that it allowed you to use the more
configurable <forward> element to describe the forward so I think
SuccessAction examples should include <forward> attributes that couldn't
be done any other way.

Having said all that, I do like that we're trying to get a simpler
action/forward declaration syntax :-).

> 
> Now that's simple. Especially if you allow a global default forward...
> 
>   <action path="/myAction"/>

All we know from this is that there is an action mapped to /myAction but
we don't know what handles it.  Taken by itself, it looks nonsensical and
would likely cause confusion.  This may be a case where it's *too* simple.

David

> 
> Probably not quite so useful, but nicely minimal!
> 
> Steve
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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

Reply via email to