Hi Kai,
instead of ActionLink use EventLink, if you can.
The tml would look like:
<a href="#" t:type="EventLink" event="detailLink" t:context="literal:1">more</a>
<a href="#" t:type="EventLink" event="detailLink"  
t:context="literal:2">more</a>

I´d use a more "eventish" name for the event. How about "detailClicked"?

Regards, nillehammer
==
http://www.winfonet.eu

----- original Nachricht --------

Betreff: Re: ActionLink in bundle message
Gesendet: Fr, 10. Jul 2009
Von: Kai Weber<kai.we...@glorybox.de>

> Thiago H. de Paula Figueiredo wrote:
> > On Tue, Jul 7, 2009 at 12:15 PM, shymon<shym...@poczta.onet.pl> wrote:
> > 
> >> I have message with parameter which I replace using messages.format
> method.
> >> I also create link object with createEventLink() and   element using
> Element
> >> class.
> >> It almost works, but link created this way has no id so I cannot handle
> only
> >> it's action.
> > 
> > You don't need a component id to handle its event: just handle the
> > event normally:
> > 
> > @OnEvent("nameOfYourEvent")
> > void handle() {...}
> > 
> > If you create more than one event link this way, generate their links
> > with different event names or provide some activation context to them.
> > 
> 
> Could you elaborate me if i create:
> 
> <a href="#" t:type="ActionLink" t:id="detailLink"
> t:context="literal:1">more</a>
> <a href="#" t:type="ActionLink" t:id="detailLink"
> t:context="literal:2">more</a>
> 
> and
> 
> @OnEvent("detailLink")
> void handle(int id) {...}
> 
> I always get an exception that the same id is not allowed for a component.
> 
> What did I wrong?
> 
> Kai
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
> 
> 

--- original Nachricht Ende ----


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to