users@javaserverfaces-spec-public.java.net

[jsr344-experts mirror] [jsr344-experts] Re: [jsr-344-experts] Handling AbortProcessingException is unconsistent

From: Edward Burns <edward.burns_at_oracle.com>
Date: Wed, 16 May 2012 09:21:58 -0700

>>>>> On Thu, 26 Apr 2012 12:15:36 -0400, Andy Schwartz <andy.schwartz_at_oracle.com> said:

AS> Let's look at 2 command buttons:

AS> 1. <h:commandButton action="#{test.handleAction}"/>
AS> 2. <h:commandButton actionListener="#{test.handleActionEvent}"/>

AS> Where the method expressions evaluate to:

>> public String handleAction()
>> {
>> throw new IllegalStateException("Action failed.");
>> }
>>
>> public void handleActionEvent(ActionEvent event)
>> {
>> throw new IllegalStateException("ActionListener failed.");
>> }

AS> #1 results in a FacesException (indirectly wrapping the
AS> IllegalStateException) being delivered to the ExceptionHandler. This
AS> triggers the default ExceptionHandler's standard behavior - eg. when
AS> running in development project stage, we get the nice Facelets error
AS> page. (Yay!)

AS> #2 results in an AbortProcessingException (wrapping the
AS> IllegalStateException) being delivered to the ExceptionHandler. This
AS> triggers the following bit of cryptic spec behavior (or non-behavior),
AS> from section 6.2.1, "Default ExceptionHandler implementation":

I assert that my fix for
<http://java.net/jira/browse/JAVASERVERFACES_SPEC_PUBLIC-1092> fixes
this.

M jsf-api/src/main/java/javax/faces/event/MethodExpressionActionListener.java
M jsf-api/src/main/java/javax/faces/event/MethodExpressionValueChangeListener.java

- Remove the statement "If that fails for any reason, throw an
  AbortProcessingException, including the cause of the failure," from
  the spec for processValueChange and processAction.

The implementation work for this is still pending.

Andy, can you please confirm that this is an acceptable resolution.

Thanks,

Ed
-- 
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage:               | http://ridingthecrest.com/