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]

Reply via email to