dev@javaserverfaces.java.net

Re: Seeking Review: [1041-UIInput.updateModelExceptionHandler]

From: Jason Lee <jason_at_steeplesoft.com>
Date: Mon, 16 Mar 2009 09:30:41 -0500

Makes sense to me.

r=jdlee

On Mar 16, 2009, at 9:26 AM, Ed Burns wrote:

> 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/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>

Jason Lee, SCJP
Senior Java Developer, Sun Microsystems
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com