org.apache.myfaces.trinidad.render

## Interface DialogRenderKitService

-     public interface DialogRenderKitService

  Interface to be implemented by RenderKits that support the launching of dialogs. The `UIXCommand` components will not support launching dialogs unless the render kit provides an implementation of this API. Developers should always retrieve an instance using `Service.getService(java.lang.Object, java.lang.Class<T>)`, passing in the current RenderKit.

          RenderKit rk = facesContext.getRenderKit();
          DialogService service = (DialogRenderKitService)
            Service.getService(rk, DialogRenderKitService.class);

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `isReturning(javax.faces.context.FacesContext context, javax.faces.component.UIComponent source)` Returns true if the RenderKit is aware that a dialog has returned, and the given source component was responsible for launching that dialog.
    `boolean` | `launchDialog(javax.faces.context.FacesContext context, javax.faces.component.UIViewRoot targetRoot, javax.faces.component.UIComponent source, Map<String,Object> processParameters, boolean useWindow, Map<String,Object> windowProperties)` Launch a dialog, if possible given the current agent's capabilities.
    `boolean` | `returnFromDialog(javax.faces.context.FacesContext context, Object returnValue)` Called to return from a dialog.

- - ### Method Detail

    - #### launchDialog

          boolean launchDialog(javax.faces.context.FacesContext context,
                             javax.faces.component.UIViewRoot targetRoot,
                             javax.faces.component.UIComponent source,
                             Map<String,Object> processParameters,
                             boolean useWindow,
                             Map<String,Object> windowProperties)

      Launch a dialog, if possible given the current agent's capabilities. If the dialog cannot be launched, return false, indicating that the caller should fallback to launching a simple subprocess. The dialog may not be launched immediately; this method may result in simply queuing up behavior for the Render Response phase, when `ExtendedRenderKitService.encodeScripts(javax.faces.context.FacesContext)` can output markup that will actually launch the dialog.
      Parameters:
        `context` - the current FacesContext
        `source` - the source component
        `targetRoot` - the UIViewRoot that should be displayed
        `processParameters` - a set of parameters to populate the newly created pageFlowScope
        `useWindow` - if true, try to show the dialog in a separate window. The meaning of this parameter can be interpreted by the RenderKit, and does not necessarily have to map to a full window.
        `windowProperties` - a map of UI parameters used to modify the dialog. The list of property names that are supported will depend on the `RenderKit`, but common examples include "width" and "height".
      Returns:
        true if launching the dialog was handled by this service, false if it could not be, in which case ADF Faces will fall back on default dialog functionality.

    - #### returnFromDialog

          boolean returnFromDialog(javax.faces.context.FacesContext context,
                                 Object returnValue)

      Called to return from a dialog.
      Parameters:
        `context` - the current FacesContext
        `returnValue` - the value being returned from the dialog

    - #### isReturning

          boolean isReturning(javax.faces.context.FacesContext context,
                            javax.faces.component.UIComponent source)

      Returns true if the RenderKit is aware that a dialog has returned, and the given source component was responsible for launching that dialog.
      Parameters:
        `context` - the current FacesContext
        `source` - the source component

Copyright © 2001-2016 The Apache Software Foundation. All Rights Reserved.