org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation
Class ServerSideWindowHandler
java.lang.Object
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowHandler
org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation.ServerSideWindowHandler
- All Implemented Interfaces:
- Serializable, WindowHandler
@Alternative
public class ServerSideWindowHandler
- extends DefaultWindowHandler
use this implementation to avoid tokens in the url.
attention: e.g. manual window refreshes aren't supported due to browser restrictions
- See Also:
- Serialized Form
Method Summary |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServerSideWindowHandler
protected ServerSideWindowHandler()
ServerSideWindowHandler
@Inject
protected ServerSideWindowHandler(WindowContextConfig config)
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
- Overrides:
sendRedirect
in class DefaultWindowHandler
- 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
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
- Overrides:
restoreWindowId
in class DefaultWindowHandler
- Parameters:
externalContext
- current external-context
- Returns:
- extracted window-id, null otherwise
Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.