Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.1.6-SNAPSHOT, 1.2.3
-
None
-
None
Description
When update model phase is executed, if multiple error occur when setting the values (could occur when a value is set to a EL expression), the errors should be added to the org.apache.myfaces.errorHandling.exceptionList, so the FacesServlet can manage it properly like this:
Exception while ...............message 1..........
Exception while ...............message 2..........
Caused by:
........cause 1.......
........cause 2.......
.....stackTrace 1.....
.....stackTrace 2.....
Checking the code there is some errors like this (class UIInput myfaces core 1.1.5):
private void queueExceptionInRequest(FacesContext context, ValueBinding binding, Exception e) {
List li = (List) context.getExternalContext().getRequestMap().get(ERROR_HANDLING_EXCEPTION_LIST);
if(null==li)
}
Note the bad closing '}', it causes that previous errors be lost.
The idea is add a method to be called from FacesServlet like this:
class _ErrorPageWriter
public static void handleExceptionList(FacesContext facesContext, List exceptionList) throws ServletException, IOException
{ ...........handle it.......... }if no method on custom ErrorPageWriter is defined, the old way is used (just show the first exception).