Element listenerElement = (Element)list.item(i);
WidgetListenerBuilder listenerBuilder = null;
try {
listenerBuilder = (WidgetListenerBuilder)widgetListenerBuilderSelector.select(listenerElement.getLocalName());
} catch (ServiceException e) {
throw new CascadingException("Unknown kind of eventlistener '" + listenerElement.getLocalName()
+ "' at " + DomHelper.getLocation(listenerElement), e);
}
WidgetListener listener = listenerBuilder.buildListener(listenerElement, listenerClass);
widgetListenerBuilderSelector.release(listenerBuilder);
if (result == null) result = new ArrayList();