https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=1041
Issue: Exception Handling
SECTION: Modified Files
----------------------------
M jsf-api/src/javax/faces/event/ExceptionQueuedEvent.java
- fix grammar
M jsf-api/src/javax/faces/component/UIInput.java
- UIInput.updateModel() was the only place in Mojarra where new
ExceptionQueuedEvent() was called directly, rather than as a
side-effect of Application.publishEvent(). This didn't seem right, so
I fixed it to be in line with the rest of the calls. It seems to work.
SECTION: Diffs
----------------------------
Index: jsf-api/src/javax/faces/event/ExceptionQueuedEvent.java
===================================================================
--- jsf-api/src/javax/faces/event/ExceptionQueuedEvent.java (revision 6824)
+++ jsf-api/src/javax/faces/event/ExceptionQueuedEvent.java (working copy)
@@ -43,7 +43,7 @@
* javax.faces.application.Application#publishEvent} is called with
* <code>ExceptionQueuedEvent.class</code> as <code>systemEventClass</code>
* argument. In this case, an instance of {_at_link ExceptionQueuedEventContext}
- * is be passed as the <code>source</code> argument. The specification
+ * must be passed as the <code>source</code> argument. The specification
* for <code>publishEvent()</code>, requires the instantiation of the
* <code>systemEventClass</code> argument, passing the
* <code>source</code> argument to the constructor.</p>
Index: jsf-api/src/javax/faces/component/UIInput.java
===================================================================
--- jsf-api/src/javax/faces/component/UIInput.java (revision 6824)
+++ jsf-api/src/javax/faces/component/UIInput.java (working copy)
@@ -944,13 +944,14 @@
@SuppressWarnings({"ThrowableInstanceNeverThrown"})
UpdateModelException toQueue =
new UpdateModelException(message, caught);
- ExceptionHandler exHandler = context.getExceptionHandler();
ExceptionQueuedEventContext eventContext =
new ExceptionQueuedEventContext(context,
toQueue,
this,
PhaseId.UPDATE_MODEL_VALUES);
- exHandler.processEvent(new ExceptionQueuedEvent(eventContext));
+ context.getApplication().publishEvent(ExceptionQueuedEvent.class,
+ eventContext);
+
}
}
--
| ed.burns_at_sun.com | office: 408 884 9519 OR x31640
| homepage: | http://ridingthecrest.com/