<h:form> calls ViewHandler.getActionURL() in order to resolve the <form
The problem here is that when a page is accessed via a bookmarkable URL, the
form action does not use that bookmarkable URL for postbacks. This means that as
soon as a form is submitted, the page query-parameters are lost, meaning that
the resource (while it may still be functionally equivalent) is no longer
capable of bookmarking.
The argument "you shouldn't bookmark after a form submit:"
Bookmarking after a form submit should be just as valid as bookmarking that
resource the first time the page was accessed via GET-based navigation.
This loss of bookmarkability occurs when a form is submitted, validation fails,
or the page is re-rendered without re-directing and including page params
through a faces-config.xml complex navigation case.
A simple use-case to show the behavior: /faces/index.xhtml
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<f:viewParam name="foo" value="#
<h:link outcome="index.xhtml" value="go to bookmarkable URL" >
<f:param name="foo" value="bar" />
<h:commandButton value="destroy bookmarkable URL"
My proposed solution for this issue is to require that forms either:
A. re-render the URL of the page with which it was accessed.
B. require that forms call ViewHandler.getBookmarkableURL() instead of
ViewHandler.getActionURL(), and also require that any page parameter supplied
during the initial request, be preserved.