tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jesse Kuhnert (JIRA)" <...@tapestry.apache.org>
Subject [jira] Commented: (TAPESTRY-1556) EventConnectionVisitor is sometimes not wired properly
Date Tue, 14 Aug 2007 22:13:30 GMT

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

Jesse Kuhnert commented on TAPESTRY-1556:
-----------------------------------------

I'm not entirely comfortable implementing these changes anymore because I don't understand
the error condition enough to know whether there might be a better way to do this.  

Can you give me some more details on exactly what scenario might make this bug surface ? (perhaps
with a small sample of something if possible) 

> 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.3
>
>
> 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


Mime
View raw message