--- Ted Husted <[EMAIL PROTECTED]> wrote:

> On 10/28/06, Don Brown <[EMAIL PROTECTED]> wrote:
> > Well, my original purpose is to find a way to best
> handle the case where
> > we want to generate multiple types of output
> without the Action being
> > aware of it.  Foremost in my mind is the ability
> to have an action be
> > called and expect HTML, partial HTML, or JSON
> without affecting the
> > Action.

In current situation action is not aware of result
type.  It just returns string result code. 

> Then how about a "Result Controller" that can select
> among possible
> results, the same way that an Action can. The Action
> can focus on the
> business logic, and the Result Control can focus on
> the view logic,
> but they could others look and feel the same.


> A single result controller could handle all the
> selection logic for
> the result code returned by the action.
> 
> <result-selector name="agent"
> class="o.a.s.d.UserAgentResultSelector"/>
> 
> <action name="ViewFoo"
> class="mypackage.ViewFooAction">
> 
>    <selector type="agent">
>      <result
> name=""modern-browser">ViewFoo.jsp</result>
>      <result
> name="netscape4">ViewFoo-netscape4.jsp</result>
>   </selector>
> 
>    <selector name="failure" type="agent">
>      <result
> name=""modern-browser">ViewFoo-failure.jsp</result>
>      <result
>
name="netscape4">ViewFoo-netscape4-failure.jsp</result>
>   </selector>

I do not think this use case is worth introducing 
new configuration stuff.  You may as well  use 
custom result type and pass parameters to it within
vanilla xwork config.

regards,

----[ Konstantin Pribluda http://www.pribluda.de ]----------------
Still using XDoclet 1.x?  XDoclet 2 is released and of production quality.
check it out: http://xdoclet.codehaus.org


 
__________________________________________________________________________________________
Check out the New Yahoo! Mail - Fire up a more powerful email and get things 
done faster. 
(http://advision.webevents.yahoo.com/mailbeta) 


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

Reply via email to