* @param method
*/
private void bindEventHandler(Component componentRoot, Object controller,
Method method) {
String componentId = method.getAnnotation(UiHandler.class).value();
Component component = tryToFindComponentById(componentRoot, componentId);
Class<?> eventType = (method.getParameterTypes().length > 0 ? method
.getParameterTypes()[0] : null);
if (eventType == null) {
throw new BinderException(
"Couldn't figure out event type for method " + method + ".");
}
Method addListenerMethod = getAddListenerMethod(component.getClass(),
eventType);
if (addListenerMethod != null) {
try {
Object listener = createListenerProxy(
addListenerMethod.getParameterTypes()[0], eventType,