org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation
Class DefaultWindowHandler
java.lang.Object
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowHandler
- All Implemented Interfaces:
- Serializable, WindowHandler
- Direct Known Subclasses:
- ClientSideWindowHandler
@ApplicationScoped
public class DefaultWindowHandler
- extends Object
- implements WindowHandler
- Author:
- Gerhard Petracek
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
useWindowAwareUrlEncoding
protected boolean useWindowAwareUrlEncoding
DefaultWindowHandler
protected DefaultWindowHandler()
DefaultWindowHandler
@Inject
protected DefaultWindowHandler(WindowContextConfig config)
encodeURL
public String encodeURL(String url)
- Allows to intercept the URL encoding
- Specified by:
encodeURL
in interface WindowHandler
- Parameters:
url
- URL which has to be encoded
- Returns:
- the changed URL
sendRedirect
public void sendRedirect(javax.faces.context.ExternalContext externalContext,
String url,
boolean addRequestParameter)
throws IOException
- Allows to intercept redirects
- Specified by:
sendRedirect
in interface WindowHandler
- Parameters:
externalContext
- current external-contexturl
- current URLaddRequestParameter
- flag which indicates if the request-parameters should be added to the URL
- Throws:
IOException
- exception which might be thrown by the external-context during the redirect
createWindowId
public String createWindowId()
- Creates a new and unique window-id for the current user-session
- Specified by:
createWindowId
in interface WindowHandler
- Returns:
- valid window-id
restoreWindowId
public String restoreWindowId(javax.faces.context.ExternalContext externalContext)
- Allows to restore the window-id depending on the window-strategy supported by the implementation
- Specified by:
restoreWindowId
in interface WindowHandler
- Parameters:
externalContext
- current external-context
- Returns:
- extracted window-id, null otherwise
getCurrentWindowId
protected String getCurrentWindowId()
addWindowIdIfNecessary
protected String addWindowIdIfNecessary(String url,
String windowId)
Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.