DirectLink listening to session state method

2006-06-06 Thread Willem van Asperen
Hi All,

Is there a  way to create an @DirectLink that listens to a method on a state 
object that I have in my session?

What I would like to do is:



Here the someMethod method returns a string with the name of the 'next' page.

Thanks,

Willem van Asperen

PA Consulting Group
Innovation. Responsiveness. Delivery.
Coltbaan 33
P.O. Box 1043
3430 BA Nieuwegein
The Netherlands
http://www.paconsulting.com/

DISCLAIMER:  This document should only be read by those persons to whom it is 
addressed and is not intended to be relied upon by any person without 
subsequent written confirmation of its contents.  PA Consulting Group disclaims 
all responsibility and accepts no liability (including in negligence) for the 
consequences of any person acting, or refraining from acting, on such 
information prior to the receipt by those persons of subsequent written 
confirmation.  If you have received this e-mail message in error, please notify 
us immediately by telephone on +31302829600.  Please also destroy and delete 
the message from your computer.  Any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail message is strictly prohibited.


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



RE: subclass or bean?

2006-05-27 Thread Willem van Asperen
Thanks for the comments.

Building components does indeed sound like the "proper" way to do it. And 
creating components is not a difficult thing to do. But where can I find some 
material on these "...Link" classes -- it would be good if there were some 
explanation or even examples. The code is hard to comprehend.

Regards,
Willem

-Original Message-
From: Jesse Kuhnert [mailto:[EMAIL PROTECTED]
Sent: vrijdag 26 mei 2006 22:17
To: Tapestry users
Subject: Re: subclass or bean?


It depends on exactly what kind of functionality you are working with in
these listeners, but I would probably do something similar to:

-) If you do have functionality that's not related to the web stuff at all
make it a bean that is managed via hivemind, ie make it a service that you
inject. http://jakarta.apache.org/hivemind/hivemind/BuilderFactory.html

-) Try to avoid subclassing whenever possible. Sometimes it's needed, but
often times it usually means there might be a better way.

In your case I would do what comes naturally in tapestry when you have
common functionality like this, create components. (they can have listeners
and do pretty much anything that a page can do ) Wrap all of it in a Border
component that itself just wraps these components.

Most Border components (you can find ample examples in the tapestry example
apps ) wrap Shell Body (custom common fucntionality components, like
navigation/etc..) @RenderBody to allow your page to have its content
written, and finally a common footer.

On 5/26/06, Willem van Asperen <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I have a set of pages that have very similar behavior. They have listeners
> like "handleTransition" and "startNewProcess". The first implementation I
> did was, obviously, to capture all these general functionality into XXX a
> subclass of BasePage and then sub class my page classes YYY from there.
>
> Now I can DirectLink to these general listeners directly.
>
> But -- is that the natural way to implement this? Should I not capture the
> general functionality into a bean that is "injected" into the page? But do I
> then need to manually wire the listener of the page to the bean's methods?
>
> Is there a way to  for the XXX page, such that these are
> true for all descendents of it?
>
> Thanks for your thoughts,
>
> Regards,
>
> Willem van Asperen
>
> PA Consulting Group
> Innovation. Responsiveness. Delivery.
> Coltbaan 33
> P.O. Box 1043
> 3430 BA Nieuwegein
> The Netherlands>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Jesse Kuhnert
Tacos/Tapestry, team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind.

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



subclass or bean?

2006-05-26 Thread Willem van Asperen
Hello,

I have a set of pages that have very similar behavior. They have listeners like 
"handleTransition" and "startNewProcess". The first implementation I did was, 
obviously, to capture all these general functionality into XXX a subclass of 
BasePage and then sub class my page classes YYY from there.

Now I can DirectLink to these general listeners directly.

But -- is that the natural way to implement this? Should I not capture the 
general functionality into a bean that is "injected" into the page? But do I 
then need to manually wire the listener of the page to the bean's methods?

Is there a way to  for the XXX page, such that these are true 
for all descendents of it?

Thanks for your thoughts,

Regards,

Willem van Asperen

PA Consulting Group
Innovation. Responsiveness. Delivery.
Coltbaan 33
P.O. Box 1043
3430 BA Nieuwegein
The Netherlands
+31652015182
http://www.paconsulting.com/

DISCLAIMER:  This document should only be read by those persons to whom it is 
addressed and is not intended to be relied upon by any person without 
subsequent written confirmation of its contents.  PA Consulting Group disclaims 
all responsibility and accepts no liability (including in negligence) for the 
consequences of any person acting, or refraining from acting, on such 
information prior to the receipt by those persons of subsequent written 
confirmation.  If you have received this e-mail message in error, please notify 
us immediately by telephone on +31302829600.  Please also destroy and delete 
the message from your computer.  Any form of reproduction, dissemination, 
copying, disclosure, modification, distribution and/or publication of this 
e-mail message is strictly prohibited.


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



subscribe

2006-05-26 Thread willem . van . asperen


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