You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <de...@tapestry.apache.org> on 2007/06/08 06:47:25 UTC

[jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

     [ https://issues.apache.org/jira/browse/TAPESTRY-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship closed TAPESTRY-1370.
------------------------------------------


> Add a component event result processor for Class instances
> ----------------------------------------------------------
>
>                 Key: TAPESTRY-1370
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1370
>             Project: Tapestry
>          Issue Type: New Feature
>          Components: tapestry-core
>    Affects Versions: 5.0
>            Reporter: Daniel Gredler
>            Assignee: Daniel Gredler
>            Priority: Minor
>             Fix For: 5.0.5
>
>
> I find that my event handlers that need to redirect to other pages often return a string:
>     return Start.class.getSimpleName();
> It would be nice if I could just return a Class instance:
>     return Start.class;
> This change would involve a new class, ClassResultProcessor, implementing ComponentEventResultProcessor, plus a line in TapestryModule#contributeComponentEventResultProcessor to add it to the configuration.

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


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

Posted by Davor Hrg <hr...@gmail.com>.
Web flow is ok, but I would prefer if Enums would be used for it,
it instead of strings (they're easily mapped from string and back)

Every enum is a type for it self and as such a handler
can be attached to each, unlike the string: where we have only one shot
to choose the right (natural) one.

I've recently created a small state machine for a complicated
processing to break it into managable parts.
Defining a state machine using Enums was no more complicated
than defining in a some xml, but felt a lot more natural and Java like.
(and I could use autocomplete as well :):) )


Davor Hrg


On 6/9/07, Massimo Lusetti <ml...@gmail.com> wrote:
>
> On 6/8/07, Howard Lewis Ship <hl...@gmail.com> wrote:
>
> > That's a good point ... should we just get rid of String response?
>
> By my point of view... yes.
>
> > I'm not certain; there may be some cases (such as the forthcoming
> > Spring Web Flow integration) where strings would be more
> > useful/convienient than Class instances.
>
> Actually i don't know about Spring Web Flow (never used) but besides
> that i don't see any reason why not to remove it now. Class return
> type is more safe then String.
>
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>

Re: [jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

Posted by Massimo Lusetti <ml...@gmail.com>.
On 6/8/07, Howard Lewis Ship <hl...@gmail.com> wrote:

> That's a good point ... should we just get rid of String response?

By my point of view... yes.

> I'm not certain; there may be some cases (such as the forthcoming
> Spring Web Flow integration) where strings would be more
> useful/convienient than Class instances.

Actually i don't know about Spring Web Flow (never used) but besides
that i don't see any reason why not to remove it now. Class return
type is more safe then String.

-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

Posted by Howard Lewis Ship <hl...@gmail.com>.
That's a good point ... should we just get rid of String response?

I'm not certain; there may be some cases (such as the forthcoming
Spring Web Flow integration) where strings would be more
useful/convienient than Class instances.

On 6/8/07, Massimo Lusetti <ml...@gmail.com> wrote:
> On 6/8/07, Davor Hrg <hr...@gmail.com> wrote:
>
> > it seems that by adding the class resolver string response becomes obsolete
> > for resolving pages,
>
> FWIW I couldn't agree more.
> --
> Massimo
> http://meridio.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Howard M. Lewis Ship
TWD Consulting, Inc.
Independent J2EE / Open-Source Java Consultant
Creator and PMC Chair, Apache Tapestry
Creator, Apache HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

Posted by Massimo Lusetti <ml...@gmail.com>.
On 6/8/07, Davor Hrg <hr...@gmail.com> wrote:

> it seems that by adding the class resolver string response becomes obsolete
> for resolving pages,

FWIW I couldn't agree more.
-- 
Massimo
http://meridio.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: [jira] Closed: (TAPESTRY-1370) Add a component event result processor for Class instances

Posted by Davor Hrg <hr...@gmail.com>.
it seems that by adding the class resolver string response becomes obsolete
for resolving pages,
wouldn't it be more natural it is translated to TextStreamResponse, or sth
else  ?



On 6/8/07, Howard M. Lewis Ship (JIRA) <de...@tapestry.apache.org> wrote:
>
>
>      [
> https://issues.apache.org/jira/browse/TAPESTRY-1370?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel]
>
> Howard M. Lewis Ship closed TAPESTRY-1370.
> ------------------------------------------
>
>
> > Add a component event result processor for Class instances
> > ----------------------------------------------------------
> >
> >                 Key: TAPESTRY-1370
> >                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1370
> >             Project: Tapestry
> >          Issue Type: New Feature
> >          Components: tapestry-core
> >    Affects Versions: 5.0
> >            Reporter: Daniel Gredler
> >            Assignee: Daniel Gredler
> >            Priority: Minor
> >             Fix For: 5.0.5
> >
> >
> > I find that my event handlers that need to redirect to other pages often
> return a string:
> >     return Start.class.getSimpleName();
> > It would be nice if I could just return a Class instance:
> >     return Start.class;
> > This change would involve a new class, ClassResultProcessor,
> implementing ComponentEventResultProcessor, plus a line in
> TapestryModule#contributeComponentEventResultProcessor to add it to the
> configuration.
>
> --
> This message is automatically generated by JIRA.
> -
> You can reply to this email to add a comment to the issue online.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>