You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Andreas Bohnert <ab...@online.de> on 2004/01/12 15:28:14 UTC
Listeners
hi,
there is something about listeners I really want to know:
listener methods get collected in a container called listeners at runtime.
the listener method for an direct link inside a html page has to be
implemented in the corresponding java class.
i would like to implement the listener in an object inside my
corresponding java class. but I can't do something like that:
ognl:listeners.myeventhandlers.userSelectDelete
because the listeners container don't contain any method;)
Is there any solution?
Anyway, this is not really a problem, but it would be nice....
thanks
andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Listeners
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
Nope; back in the beginning, there was no listeners property or listener methods and you had to
write lots of busy-work code to create inner classes implementing IActionListener.
I believe that Tapestry's approach is somewhat similar to C#'s delegates.
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Tapestry: Java Web Components
http://jakarta.apache.org/tapestry/
http://javatapestry.blogspot.com
> -----Original Message-----
> From: Andreas Bohnert [mailto:abo@online.de]
> Sent: Monday, January 12, 2004 9:55 AM
> To: Tapestry users
> Subject: Re: Listeners
>
>
> I thought I HAVE to use the listener container. Ok, thanks very much!
> andreas
>
> Harish Krishnaswamy wrote:
>
> > If you look at the listener parameter in component
> reference, all that
> > the listener is looking for is an IActionListener. The "listeners"
> > property is simply a convenience feature, you may implement
> a method
> > anywhere that returns an IActionListener for the listener parameter.
> >
> > -Harish
> >
> > Andreas Bohnert wrote:
> >
> >> hi,
> >>
> >> there is something about listeners I really want to know:
> >>
> >> listener methods get collected in a container called listeners at
> >> runtime.
> >> the listener method for an direct link inside a html page
> has to be
> >> implemented in the corresponding java class.
> >>
> >> i would like to implement the listener in an object inside my
> >> corresponding java class. but I can't do something like that:
> >>
> >> ognl:listeners.myeventhandlers.userSelectDelete
> >>
> >> because the listeners container don't contain any method;)
> >>
> >> Is there any solution?
> >> Anyway, this is not really a problem, but it would be nice....
> >>
> >> thanks
> >> andreas
> >>
> >>
> >>
> >>
> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >>
> >>
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Listeners
Posted by Andreas Bohnert <ab...@online.de>.
I thought I HAVE to use the listener container. Ok, thanks very much!
andreas
Harish Krishnaswamy wrote:
> If you look at the listener parameter in component reference, all that
> the listener is looking for is an IActionListener. The "listeners"
> property is simply a convenience feature, you may implement a method
> anywhere that returns an IActionListener for the listener parameter.
>
> -Harish
>
> Andreas Bohnert wrote:
>
>> hi,
>>
>> there is something about listeners I really want to know:
>>
>> listener methods get collected in a container called listeners at
>> runtime.
>> the listener method for an direct link inside a html page has to be
>> implemented in the corresponding java class.
>>
>> i would like to implement the listener in an object inside my
>> corresponding java class. but I can't do something like that:
>>
>> ognl:listeners.myeventhandlers.userSelectDelete
>>
>> because the listeners container don't contain any method;)
>>
>> Is there any solution?
>> Anyway, this is not really a problem, but it would be nice....
>>
>> thanks
>> andreas
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Listeners
Posted by Harish Krishnaswamy <hk...@comcast.net>.
If you look at the listener parameter in component reference, all that the listener is looking for
is an IActionListener. The "listeners" property is simply a convenience feature, you may implement a
method anywhere that returns an IActionListener for the listener parameter.
-Harish
Andreas Bohnert wrote:
> hi,
>
> there is something about listeners I really want to know:
>
> listener methods get collected in a container called listeners at runtime.
> the listener method for an direct link inside a html page has to be
> implemented in the corresponding java class.
>
> i would like to implement the listener in an object inside my
> corresponding java class. but I can't do something like that:
>
> ognl:listeners.myeventhandlers.userSelectDelete
>
> because the listeners container don't contain any method;)
>
> Is there any solution?
> Anyway, this is not really a problem, but it would be nice....
>
> thanks
> andreas
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org