You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Andy Yeung (JIRA)" <ta...@jakarta.apache.org> on 2006/11/23 02:59:03 UTC

[jira] Commented: (TAPESTRY-1155) Same event ID is generated for EventListener rendered within loop

    [ http://issues.apache.org/jira/browse/TAPESTRY-1155?page=comments#action_12452098 ] 
            
Andy Yeung commented on TAPESTRY-1155:
--------------------------------------

Hi, here is some more update on the issue. After changing the initial hash, the javascript is generated correctly, but the ComponentEventInvoker failed to work. In the invokeListeners method, 

            // ensure ~only~ the method that targeted this event gets called!
            if (!eventListener.getComponentId().equals(event.getTarget().get("id"))
                continue;

The getComponentId return the non unique name of the component while the event.getTarget().get("id") return the unique client id. Thus the listener failed to be triggered.
My current workaround is to use 
             
             if (!eventListener.getComponentId().equals(cycle.getParameter("component")))
                continue;



> Same event ID is generated for EventListener rendered within loop
> -----------------------------------------------------------------
>
>                 Key: TAPESTRY-1155
>                 URL: http://issues.apache.org/jira/browse/TAPESTRY-1155
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 4.1.1
>         Environment: Not environment related
>            Reporter: Andy Yeung
>         Assigned To: Jesse Kuhnert
>
> I have use the EventListener with the use of target while the target is rendered within a For. The script can generate multiple javascript with different clientId but the event ID are the same. 
> ComponentEventConnectionWorker.getEvents function need to include the clientId during hash generation to prevent duplicated event ID for component. But I also found that this method is also called by renderBody method besides linkComponent. So I don't know whether the fix is adding a String as parameter for initial hash and pass target (renderBody) and clientId(linkComponent) to generate the initial hash value.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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