tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marcus Schulte (JIRA)" <...@tapestry.apache.org>
Subject [jira] Updated: (TAPESTRY-1556) EventConnectionVisitor is sometimes not wired properly
Date Wed, 10 Sep 2008 17:43:46 GMT

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

Marcus Schulte updated TAPESTRY-1556:
-------------------------------------

    Fix Version/s:     (was: 4.1.6)
                   4.1.7

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