org.apache.myfaces.extensions.cdi.jsf2.impl.scope.conversation
Class ServerSideWindowHandler

java.lang.Object
  extended by org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowHandler
      extended by 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

Field Summary
 
Fields inherited from class org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowHandler
useWindowAwareUrlEncoding
 
Constructor Summary
protected ServerSideWindowHandler()
           
protected ServerSideWindowHandler(WindowContextConfig config)
           
 
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 org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.DefaultWindowHandler
addWindowIdIfNecessary, createWindowId, encodeURL, getCurrentWindowId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServerSideWindowHandler

protected ServerSideWindowHandler()

ServerSideWindowHandler

@Inject
protected ServerSideWindowHandler(WindowContextConfig config)
Method Detail

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-context
url - current URL
addRequestParameter - 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.