Reply To: Error on AJAX POST: Required value was null

Splash Forums PrettyFaces Users Error on AJAX POST: Required value was null Reply To: Error on AJAX POST: Required value was null

#24337

@lincoln: The error page seems to contain a form which calls RewriteViewHandler.getActionURL() when the form is rendered. I think that something like this happens:

  • An AJAX postback is received
  • RESTORE_VIEW fails with a ViewExpiredException
  • Because of this, the _after_ RESTORE_VIEW phase listener isn’t invoked which usually injects the path parameters
  • The OmniFaces error handler gets the exception and starts to render the error page by manually calling ViewHandlingStrategy.renderView()
  • The error page contains a form which calls RewriteViewHandler.getActionURL()
  • getActionURL() fails because of the missing path parameter

So IMHO this is caused by OmniFaces’ FullAjaxExceptionHandler which perform a view rendering from the exception handler.

In the non-AJAX case, the error page would be rendered by a ERROR-type dispatch which would execute a full JSF lifecycle for the error page. In this case the parameters are therefore correctly injected and the rendering works fine.

This is just a guess. But it would explain this problem. 🙂