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
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]