Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
PrettyFaces + OmniFaces throw RuntimeException #370
We have been working in our projects with PrettyFaces (2.0.9 to 3.4.1) and OmniFaces (2.0). And it works perfectly, no problems at all.
But, when we upgrade OmniFaces to any version greater than (2.0). We are getting this messages in the stack trace:
Navigation is performed, but we don't know if the problem is related to PrettyFaces or Omnifaces.
Exception suggests that PrettyFaces tried to forward it but it really shouldn't need to do. First thing which you should check is whether the
By the way, in OmniFaces 2.6.3-SNAPSHOT I have changed the unload to send a POST instead of a GET. I recommend to try 2.6.3-SNAPSHOT to see if PrettyFaces is more happy with it.
I mean, you need to instruct/reconfigure PrettyFaces to not take any action on URLs with
Now I get your point.
OmniFaces is appending the unload event at the end of the PrettyURL. When the PrettyFaces's parser is trying to get the perfect match for the requested URL it fails, thus the
An unknown source sends a new request, the same URL without the parameter. Navigation is performed, but now the
Unfortunately PrettyFaces's extensions are limited, so I'm not able to overwrite the behaviour for URLs that contain
I'm using OmniFaces 2.6.3-SNAPSHOT, the event is indeed sent by POST, but unload parameter is still present (like a GET request). PrettyFaces would be the happiest JAR on Earth, if the unload parameter is not appended at the end of the URL.
Is there any way that parameters used by OmniFaces are not sent along with the URL?
added a commit
May 20, 2017
Just tested with
Performing navigation with
Unload event working properly, navigations is performed and no exception throwed.
Performing navigation without
Unload event pending, navigations is performed and no exception throwed.
Refreshing same page without
Unload event failed, navigations is performed and exception is throwed.
Looks like a forward issue. But at least problem is solved.