@ApplicationScoped public class DefaultWindowHandler extends Object implements WindowHandler
Modifier and Type | Field and Description |
---|---|
protected boolean |
useWindowAwareUrlEncoding |
Modifier | Constructor and Description |
---|---|
protected |
DefaultWindowHandler() |
protected |
DefaultWindowHandler(WindowContextConfig config) |
Modifier and Type | Method and Description |
---|---|
protected String |
addWindowIdIfNecessary(String url,
String windowId) |
String |
createWindowId()
Creates a new and unique window-id for the current user-session
|
String |
encodeURL(String url)
Allows to intercept the URL encoding
|
protected String |
getCurrentWindowId() |
String |
restoreWindowId(javax.faces.context.ExternalContext externalContext)
Allows to restore the window-id depending on the window-strategy supported by the implementation
|
void |
sendRedirect(javax.faces.context.ExternalContext externalContext,
String url,
boolean addRequestParameter)
Allows to intercept redirects
|
protected DefaultWindowHandler()
@Inject protected DefaultWindowHandler(WindowContextConfig config)
public String encodeURL(String url)
encodeURL
in interface WindowHandler
url
- URL which has to be encodedpublic void sendRedirect(javax.faces.context.ExternalContext externalContext, String url, boolean addRequestParameter) throws IOException
sendRedirect
in interface WindowHandler
externalContext
- current external-contexturl
- current URLaddRequestParameter
- flag which indicates if the request-parameters should be added to the URLIOException
- exception which might be thrown by the external-context during the redirectpublic String createWindowId()
createWindowId
in interface WindowHandler
public String restoreWindowId(javax.faces.context.ExternalContext externalContext)
restoreWindowId
in interface WindowHandler
externalContext
- current external-contextprotected String getCurrentWindowId()
Copyright © 2010-2014 The Apache Software Foundation. All Rights Reserved.