You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org> on 2007/06/15 22:59:26 UTC

[jira] Resolved: (TAPESTRY-1556) EventConnectionVisitor is sometimes not wired properly

     [ https://issues.apache.org/jira/browse/TAPESTRY-1556?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert resolved TAPESTRY-1556.
-------------------------------------

    Resolution: Fixed
      Assignee: Jesse Kuhnert

> EventConnectionVisitor is sometimes not wired properly
> ------------------------------------------------------
>
>                 Key: TAPESTRY-1556
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1556
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 4.1.1
>            Reporter: Lionel Touati
>            Assignee: Jesse Kuhnert
>             Fix For: 4.1.2
>
>
> The method wireElementFormEvents is sometimes broken. When comparing listener.getFormId() to f.getId(), get different results. Sometimes the ids for the same page, same component the id match, but after a tomcat restart, the ids won't match as getFormId returns the form extended id rather than the local one.
> I've changed the method to :
>  void wireElementFormEvents(EventBoundListener listener, IComponent component, IComponentSpecification spec)
>     {
>         if (listener.getFormId() == null)
>             return;
>         if (_forms.size() < 1)
>             discoverPageForms(component.getPage());
>         IForm form = null;
>         for (int i=0; i < _forms.size(); i++) {
>             IForm f = (IForm) _forms.get(i);
>             if (listener.getFormId().equals(f.getExtendedId()) || listener.getFormId().equals(f.getId())) {
>                 form = f;
>                 break;
>             }
>         }
>         // couldn't find the form they specified
>         if (form == null)
>             throw new ApplicationRuntimeException(PageloadMessages.componentNotFound(listener.getFormId()), component, component.getLocation(), null);
>         String idPath = form.getExtendedId();
>         
>         listener.setFormId(idPath);
>         _invoker.addFormEventListener(idPath, spec);
>     }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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