org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.spi
Interface WindowHandler

All Superinterfaces:
Serializable
All Known Subinterfaces:
LifecycleAwareWindowHandler
All Known Implementing Classes:
ClientSideWindowHandler, DefaultWindowHandler, ServerSideWindowHandler

public interface WindowHandler
extends Serializable

Allows to customize the basic window integration. E.g. needed for adapters for component libs which already provide a window-id concept


Method Summary
 String createWindowId()
          Creates a new and unique window-id for the current user-session
 String encodeURL(String url)
          Allows to intercept the URL encoding
 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
 

Method Detail

encodeURL

String encodeURL(String url)
Allows to intercept the URL encoding

Parameters:
url - URL which has to be encoded
Returns:
the changed URL

sendRedirect

void sendRedirect(javax.faces.context.ExternalContext externalContext,
                  String url,
                  boolean addRequestParameter)
                  throws IOException
Allows to intercept redirects

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

createWindowId

String createWindowId()
Creates a new and unique window-id for the current user-session

Returns:
valid window-id

restoreWindowId

String restoreWindowId(javax.faces.context.ExternalContext externalContext)
Allows to restore the window-id depending on the window-strategy supported by the implementation

Parameters:
externalContext - current external-context
Returns:
extracted window-id, null otherwise


Copyright © 2010-2012 The Apache Software Foundation. All Rights Reserved.