private ViewProxy callAndMapHandlers(ForwardProxy proxy) throws Exception {
boolean valid = true;
ForwardProxy result = proxy;
while (result.isEventType()) {
// Map URI params into event, then callHandlers again
Event next = getConfig().getEventProxy(result.getPath()).getEvent();
if (getContextWrapper().hasResponseURIAttributes()) {
valid = mapAttributesToEvent(getContextWrapper().getResponseURIAttributes(), next, getConfig().validateFor(next.getEventName()));
}
if (valid) {
result = callHandlers(result.getPath(), next, ViewType.HTML);
} else {
return new ViewProxy(result, getValidationFailedView(next, next.getEventName()).getPath());
}
}
getContextWrapper().clearResponseURIAttributes();
return new ViewProxy(result, result.getPath());
}