Tapestry does magic behind the scenes that really makes it not
necessary to worry about the interface itself.  When you invoke
ognl:listeners.someListener Tapestry has a keen Map implementation
that wraps the someListener method in a synthetic  instance of
IActionListener.  You could probably get away with the parameter type
being Object actually which is better since tapestry developers
generally don't deal directly with IActionListener (unless they want
to). ergo don't worry about ActionLink vs DirectLink.

Page reference itself? Try ognl:page

Pushing info back out? You could have another parameter that takes an
arbitrary ognl expression that your component invokes when something
happens. Make sense?

Geoff








On 5/30/05, Christian <[EMAIL PROTECTED]> wrote:
> Geoff Longman schrieb:
> 
> >If I understand correctly, your component is now hardwired to a page
> >that has a particular listener method. Pretty closely coupled don't
> >you think?
> >
> >Why not add a listener parameter to the component?
> >
> ><parameter name="moveListener" type="IActionListener">
> >
> ><span jwcid="@DirectLink"
> >              listener="ognl:moveListener">
> >           Move</span>
> >
> >Geoff
> >
> >
> >
> Yes, I would like some "decouplage" here, too. Your suggestion would
> make the fact that the containing page has to provide a certain method
> obsolote.
> 
> I got some questions regarding your suggestion, forgive me to jump at
> the chance to have a real pro answered it :)
>  IActionListener has a method
>     public void actionTriggered(IComponent component, IRequestCycle cycle);
> 
> --> how do I get from "actionTriggered(IComponent component,
> IRequestCycle cycle)" to "moveListener(IRequestCycle cycle)""?
>      (I guess I don't get a fundamental concept here)
> --> and, ehm, how can the page reference itself? (ognl:this does not
> work ::))
> --> third, isn't IActionListener meant for ActionLinks instead of
> DirectLinks? I got the impression that
> ActionLink==nada and that good boys use DirectLinks
> 
> Furthermore this doesn't get me where I would like to go: Some way to be
> able to attach listeners to a kind of well defined event chain and to
> act properly to the event:
> I hope you see what I mean: When some messages are moved, and one of
> those happens to be displayed I should visually display the fact, that
> the message has moved.
> 
> Cheers
> 
> cs.
> 
> ---------------------------------------------------------------------
> 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