Unable to navigate to onError outcome during query-param validation

Splash Forums PrettyFaces Users Unable to navigate to onError outcome during query-param validation

This topic contains 0 replies, has 1 voice, and was last updated by  weljoweb 10 years, 6 months ago.

Viewing 1 post (of 1 total)
  • Author
  • #17998


    I’m trying to navigate to a JSF view when there is an error in validation, without the page being redirected or going to the standard 404 page. I thought I would do this by setting the attribute onError to a jsf navigation outcome. However I always get sent to the standard 404 page.

    Here are my configuration:

    pretty-faces config

    <url-mapping id=”catalog-email-detail”>

    <pattern value=”/catalog/email-detail” />

    <query-param name=”item_id”

    validator=”#{catalogParameterValidator.validateItemId}” onError=”#{catalogParameterValidator.getErrorOutcome}”>#{emailDetailBean.itemId}</query-param>

    <view-id value=”/faces/viewEmailDetail.jsf” />











    Looking at ParameterValidator.handleValidationFailure(final FacesContext context, final FacesMessage message, String onError), the process entered the following if scenario:

    if (!context.getResponseComplete() && !continueToFaces)


    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();






    catch (IOException e1)


    throw new PrettyException(e1);



    I think continueToFaces should be set to true if handleNavigation was called and the response is not complete.

Viewing 1 post (of 1 total)

The forum ‘PrettyFaces Users’ is closed to new topics and replies.

Comments are closed.