http://java.net/jira/browse/JAVASERVERFACES-949
- After discussion at CON_FESS 2012, remove the "url mode" from the spec
and be vague about how to implement the feature.
ACTION: EG Members, please review this in the spec. You can browse the
javadoc for the latest published spec by following the simple steps in
this blog entry.
http://weblogs.java.net/blog/edburns/archive/2012/05/17/how-view-absolute-latest-jsf-22-spec-snapshot
Start with the javadoc for the ClientWindow class [1], which is excerpted
here for your convenience.
This class represents a client window, which may be a browser tab,
browser window, browser pop-up, portlet, or anything else that can
display a UIComponent hierarchy rooted at a UIViewRoot.
Modes of Operation
none mode
The generation of ClientWindow is controlled by the value of the
context-param named by the value of
CLIENT_WINDOW_MODE_PARAM_NAME. If this context-param is not
specified, or its value is "none", no ClientWindow instances will be
generated, and the entire feature is effectively disabled for the
entire application.
Other modes
To accomadate the widest possible range of implementation choices to
support this feature, explicit names for modes other than "none" are
not specified. However, for all values of
CLIENT_WINDOW_MODE_PARAM_NAME, the lifetime of a ClientWindow starts
on the first request made by a particular client window (or tab, or
pop-up, etc) to the JSF runtime and persists as long as that window
remains open or the session expires, whichever comes first. A client
window is always associated with exactly one UIViewRoot instance at
a time, but may display many different UIViewRoots during its
lifetime.
The ClientWindow instance is associated with the incoming request
during the Lifecycle.attachWindow(javax.faces.context.FacesContext)
method. This method will cause a new instance of ClientWindow to be
created, assigned an id, and passed to
ExternalContext.setClientWindow(javax.faces.lifecycle.ClientWindow).
During state saving, regardless of the window id mode, or state
saving mode, a hidden field must be written whose name, id and value
are given as specified in ResponseStateManager.CLIENT_WINDOW_PARAM.
In addition to the hidden field already described. The runtime must
ensure that any component that renders a hyperlink that causes the
user agent to send a GET request to the Faces server when it is
clicked has a query parameter with a name and value specified in
ResponseStateManager.CLIENT_WINDOW_URL_PARAM. This requirement is
met by several of the "encode" methods on ExternalContext. See
ExternalContext.encodeActionURL(java.lang.String) for details.
SECTION: Modified Files
----------------------------
M jsf-ri/src/main/java/com/sun/faces/context/UrlBuilder.java
M jsf-ri/src/main/java/com/sun/faces/context/ExternalContextImpl.java
M jsf-ri/src/main/java/com/sun/faces/lifecycle/ClientWindowImpl.java
M jsf-api/src/main/java/javax/faces/lifecycle/ClientWindow.java
M jsf-api/src/main/java/javax/faces/context/ExternalContext.java
[1]
https://maven.java.net/service/local/repositories/snapshots/archive/javax/faces/javax.faces-api/2.2-SNAPSHOT/javax.faces-api-2.2-20120517.154527-107-javadoc.jar/!/javadocs/javax/faces/lifecycle/ClientWindow.html
--
| edward.burns_at_oracle.com | office: +1 407 458 0017
| homepage: | http://ridingthecrest.com/