You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Börcsök József <jo...@lanten.hu> on 2006/11/03 15:26:31 UTC

Using @EventListener inside @For loop

Hi

My text list editor displays current elements in text fields and the are
buttons to delete them (in a table, the first column contains inputs,
the second contains buttons). A @For loop iterates over the records.

If I use @EventListener targeted to the button (it's @Any tapestry
component, so it has a jwcid), ComponentEventInvoker registers listener
only to the first entry with the specified target jwcid
[org.apache.tapestry.annotations.EventListenerAnnotationWorker.peformEnhancement : line60], so org.apache.tapestry.services.impl.ComponentEventInvoker. invokeFormListeners cannot find listeners to the other instances because they passed different client id.

How can I tell the EventListener to register the other client ids too?
And how can I detect the index of the selected button in the event
listener method?

Thanks,
  József Börcsök


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: Using @EventListener inside @For loop

Posted by Jesse Kuhnert <jk...@gmail.com>.
Why don't you just use a DirectLink or Submit button instead? All of the
core Tapestry components (where it makes sense) support making ajax calls
natively now.

On 11/3/06, Börcsök József <jo...@lanten.hu> wrote:
>
> Hi
>
> My text list editor displays current elements in text fields and the are
> buttons to delete them (in a table, the first column contains inputs,
> the second contains buttons). A @For loop iterates over the records.
>
> If I use @EventListener targeted to the button (it's @Any tapestry
> component, so it has a jwcid), ComponentEventInvoker registers listener
> only to the first entry with the specified target jwcid
> [
> org.apache.tapestry.annotations.EventListenerAnnotationWorker.peformEnhancement: line60], so
> org.apache.tapestry.services.impl.ComponentEventInvoker.
> invokeFormListeners cannot find listeners to the other instances because
> they passed different client id.
>
> How can I tell the EventListener to register the other client ids too?
> And how can I detect the index of the selected button in the event
> listener method?
>
> Thanks,
>   József Börcsök
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Jesse Kuhnert
Tapestry/Dojo/(and a dash of TestNG), team member/developer

Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com