[ 
https://issues.apache.org/jira/browse/WW-4071?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13664167#comment-13664167
 ] 

Hudson commented on WW-4071:
----------------------------

Integrated in Struts2-JDK6 #708 (See 
[https://builds.apache.org/job/Struts2-JDK6/708/])
    WW-4071 Adds some comments about the supported *Aware interfaces (Revision 
1485153)
WW-4071 Adds new ValidationErrorAware interface to allow notify action about 
action/field errors (Revision 1485149)

     Result = SUCCESS
lukaszlenart : 
Files : 
* 
/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java

lukaszlenart : 
Files : 
* 
/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/DefaultWorkflowInterceptor.java
* 
/struts/struts2/trunk/xwork-core/src/main/java/com/opensymphony/xwork2/interceptor/ValidationErrorAware.java
* 
/struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/interceptor/ValidationErrorAwareTest.java

                
> ValidationAware add callable method, called from DefaultWorkflowInterceptor
> ---------------------------------------------------------------------------
>
>                 Key: WW-4071
>                 URL: https://issues.apache.org/jira/browse/WW-4071
>             Project: Struts 2
>          Issue Type: New Feature
>          Components: Core Interceptors
>    Affects Versions: 2.3.14
>            Reporter: Eric Lentz
>            Assignee: Lukasz Lenart
>            Priority: Minor
>             Fix For: 2.3.15
>
>
> When a form error occurs, the action is unaware of this event. There are 
> situations whereby one should know that a form error has occurred. For 
> example, one may wish to populate the ActionStack with special handling 
> variables or set a flag denoting special logic that the JSP should handle. In 
> short, it isn't unreasonable for one to want to know that a form error 
> occurred and be able to respond to it with more than just a single JSP result 
> attached to "input."
> My suggestion would be within ValidationAware, add a method:
> void actionError()
> Within DefaultWorkflowInterceptor.doIntercept, there is already an if 
> condition of:
> if (validationAwareAction.hasErrors()) {
> at the end of processing that if block, just before, "return resultName;" 
> call validationAwareAction.actionError();
> By the way, this line:
> LOG.debug("Errors on action " + validationAwareAction + ", returning result 
> name 'input'");
> should be:
> LOG.debug("Errors on action " + validationAwareAction + ", returning result 
> name '" + inputResultName + "'");

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to