On 10/30/06, Konstantin Priblouda <[EMAIL PROTECTED]> wrote:


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


I quite agree with Konstantin. Adding more and more configuration
stuff is not very good imo. In fact right now I am thinking/working
about a light version of WW/Struts2 where the configuration is
completely reduced (the biggest problem I have is with interceptors,
for which I cannot figure out a way to deduce them from context :-( ).

./alex
--
.w( the_mindstorm )p.



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]



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

Reply via email to