Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-02


oracle.adf.view.rich.component.rich
Class RichDialog

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by org.apache.myfaces.trinidad.component.UIXComponent
          extended by org.apache.myfaces.trinidad.component.UIXComponentBase
              extended by oracle.adf.view.rich.component.UIXDialog
                  extended by oracle.adf.view.rich.component.rich.RichDialog

All Implemented Interfaces:
javax.faces.component.StateHolder

public class RichDialog
extends UIXDialog

The dialog control is a layout element that displays its children inside a dialog window and delivers DialogEvents when the OK, Yes, No and Cancel actions are activated. The af:dialog must be placed inside a af:popup component and has to be the immediate child of the af:popup. To show a dialog use the af:showPopupBehavior tag or programmatically from Javascript, call show() on the popup client component. A dialog will automatically hide itself when OK, Yes or No buttons are selected provided that there are not any faces messages of severity of error or greater on the page. Selecting the Cancel button or close icon will cancel the popup and raise a popup canceled event.

Dialog Events

Client Dialog Event

When using the dialog type button configurations, action outcomes of type "ok", "yes", "no" and "cancel" can be intercepted on the client with a "dialog" type listener. Only "ok", "yes" and "no" event will be propagated to the server. The "cancel" button and close icon do raise a client dialog event but a "cancel" outcome prevents the DialogEvent from getting sent to the server. This propagation can be blocked, as with any RCF event, by calling cancel() on the JS event object. Use the af:clientListener with a type of dialog to listen for a dialog client event.

 ...
 ...
 <f:facet name="metaContainer">
   <f:verbatim>
     <script>
       function handleValueChange(event) 
       {
         var page = AdfPage.PAGE;
         var source = event.getSource();
         var popupId = source.getProperty("popupId");          
         page.setPageProperty("changedClientId", source.getClientId());
         page.setPageProperty("oldValue", event.getOldValue());
         var popup = page.findComponentByAbsoluteId(popupId);
         var hints = {};
         popup.show(hints);
       }
       function handleDialog(event) 
       {
         if (event.getOutcome() == AdfDialogEvent.OUTCOME_NO) 
         {
           var page = AdfPage.PAGE;
           var changedClientId = page.getPageProperty("changedClientId");
           var oldValue = page.getPageProperty("oldValue");
           var source = page.findComponent(changedClientId);
           source.setValue(oldValue);
         }
       }
     </script>
   </f:verbatim>
 </f:facet>
 <af:form>
   <af:panelGroupLayout>
      <af:selectOneRadio label="Gender">
         <af:selectItem label="Male" value="M"/>
         <af:selectItem label="Female" value="F"/>
         <af:clientListener method="handleValueChange" type="valueChange"/>
         <af:clientAttribute name="popupId" value="confirmationDialog"/>
      </af:selectOneRadio>
   </af:panelGroupLayout>
   <af:popup id="confirmationDialog">
     <af:dialog title="Confirm Change" type="yesNo">
        <f:verbatim><p>Would you like to save the change?</p></f:verbatim>
        <af:clientListener method="handleDialog" type="dialog"/>
     </af:dialog>
   </af:popup>
 </af:form>
   

Server Dialog Event

When a dialog event is propagated to the server, the dialog will be automatically closed on the client after the server event. If an error occurs during the server-side processing (specifically, if faces messages of error severity or greater are added) of the dialog event, then the dialog will not be closed.

 ...
 ...
 <af:form>
   <af:panelGroupLayout>
      <af:selectOneRadio label="Gender" binding="#{sharedPopup.genderComponent}" 
           valueChangeListener="#{sharedPopup.handleValueChange}" 
           autoSubmit="true"
           value="#{sharedPopup.gender}">
         <af:selectItem label="Male" value="M"/>
         <af:selectItem label="Female" value="F"/>
      </af:selectOneRadio>
   </af:panelGroupLayout> 
   <af:popup id="confirmationDialog" binding="#{sharedPopup.popupComponent}">
     <af:dialog title="Confirm Change" type="yesNo" dialogListener="#{sharedPopup.handleDialog}">
        <f:verbatim><p>Would you like to save the change?</p></f:verbatim>
     </af:dialog>
   </af:popup>
 </af:form>
 ...
 ...
 public void handleValueChange(ValueChangeEvent event) {
     setOldGender((String)event.getOldValue());
 
     FacesContext context = FacesContext.getCurrentInstance();
     String popupId = popupComponent.getClientId(context);
 
     StringBuilder script = new StringBuilder();
     script.append("var popup = AdfPage.PAGE.findComponent('")
           .append(popupId).append("'); ")
           .append("if (!popup.isPopupVisible()) { ")
           .append("var hints = {}; ")
           .append("popup.show(hints);}");
     ExtendedRenderKitService erks =
         Service.getService(context.getRenderKit(),
                            ExtendedRenderKitService.class);
     erks.addScript(context, script.toString());
 }
 
 public void handleDialog(DialogEvent event) 
 {
   if (event.getOutcome().equals(DialogEvent.Outcome.no)) 
   {
     setGender(getOldGender());
     RequestContext.getCurrentInstance().addPartialTarget(genderComponent);
   }
 }
   

Using Input Components Inside a Dialog

When using input components, such as inputText, pressing the Cancel-button will not reset the values on those controls. If you open a dialog for the second time, the old values will still be there. If you want the values to match with the current values on the server, this can be accomplished by setting contentDelivery to lazyUncached on the containing popup component. The lazyUncached content delivery type will cause the content of the popup to be re-rendered but does not reset the server-side state of the component.

The dialogs cancel button and close icon dismisses the inline popup dialog without saving any changes. However, input components having the autoSubmit property turned on, overrides the dialog's cancel behavior.

Using Custom Dialog Buttons

The af:dialog component provides a buttonBar facet that is a container used to add additional command components to the dialogs footer. Custom buttons are added after pre-configured buttons specified using the type property. These command buttons must be partial submit commands. Custom buttons will not queue the associated dialogListener but requires custom action listeners. A dialog will not automatically dismiss for custom buttons. Additional logic must be added to dismiss the popup by sending a script fragment to the client.

 ...
 ...
 <af:popup >
     <af:dialog title="Confirm Change" type="none" >
        <f:verbatim><p>Would you like to save the change?</p></f:verbatim>
       <f:facet name="buttonBar">
          <af:panelGroupLayout layout="horizontal">
            <af:commandButton text="Yes" id="yes" actionListener="#{sharedPopup.handleDialog}" partialSubmit="true"/>
            <af:commandButton text="No" id="no" actionListener="#{sharedPopup.handleDialog}" partialSubmit="true"/>           
          </af:panelGroupLayout>
       </f:facet>
     </af:dialog>
 </af:popup>
 ...
 ...
 public void handleDialog(ActionEvent event) {
     UIComponent source = (UIComponent)event.getSource();
 
     if (source.getId().equals("no")) {
         setGender(getOldGender());
         RequestContext.getCurrentInstance().addPartialTarget(genderComponent);
     }
 
     FacesContext context = FacesContext.getCurrentInstance();
     String popupId = popupComponent.getClientId(context);
 
     StringBuilder script = new StringBuilder();
     script.append("var popup = AdfPage.PAGE.findComponent('")
           .append(popupId).append("'); ")
           .append("if (popup.isPopupVisible()) { ")
           .append("popup.hide();}");
     ExtendedRenderKitService erks =
         Service.getService(context.getRenderKit(),
                            ExtendedRenderKitService.class);
     erks.addScript(context, script.toString());
 }
    

Besides using an actionListener method expression binding of a command component to dismiss a popup by sending a script fragment to the client, another approach is to create action listeners that do the same. These action listeners can attach in a declarative fashion to command components using the f:actionListener tag.

 ...
 ...
 <af:commandButton textAndAccessKey="#{viewcontrollerBundle.SAVE_AND_CLOSE}"
                   id="saveACBtn1"
                   shortDesc="#{viewcontrollerBundle.SAVE_AND_CLOSE}"
                   immediate="false" partialSubmit="true"
                   actionListener="#{bindings.Commit.execute}"
                   text="Save and Close">
   <f:actionListener type="view.PopupDismissActionListener"/>
 </af:commandButton>
 <af:commandButton textAndAccessKey="#{viewcontrollerBundle.CANCEL}"
                   id="cancelBtn1"
                   shortDesc="#{viewcontrollerBundle.CANCEL}"
                   immediate="true"
                   actionListener="#{bindings.Rollback.execute}"
                   text="Cancel" partialSubmit="true">
   <f:actionListener type="view.PopupCancelActionListener"/>
 </af:commandButton>
 ...
 ...
 public class PopupDismissActionListener implements ActionListener
 {
   private UIComponent _findPopup(UIComponent component)
   {
     if (component == null)
       return null;
 
     if (component instanceof RichPopup)
       return component;
 
     return _findPopup(component.getParent());
   }
   private boolean _hasGlobalErrors(FacesContext context)
   {
     Iterator<FacesMessage> mi = context.getMessages(null);
     while (mi.hasNext())
     {
       FacesMessage fmsg = mi.next();
       if (fmsg.getSeverity().equals(FacesMessage.SEVERITY_ERROR) ||
           fmsg.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
       {
         return true;
       }
     }
     return false;
   }
   private boolean _hasComponentErrors(FacesContext context,
                                       UIComponent component)
   {
     String clientId = component.getClientId(context);
     System.out.println(clientId);
     Iterator<FacesMessage> mi = context.getMessages(clientId);
     while (mi.hasNext())
     {
       FacesMessage fmsg = mi.next();
       if (fmsg.getSeverity().equals(FacesMessage.SEVERITY_ERROR) ||
           fmsg.getSeverity().equals(FacesMessage.SEVERITY_FATAL))
       {
         return true;
       }
     }
     for (UIComponent child: component.getChildren())
     {
       if (_hasComponentErrors(context, child))
       {
         return true;
       }
     }
     return false;
   }
   private boolean _hidePopup(FacesContext context, UIComponent popup)
   {
     return !_hasGlobalErrors(context) &&
       !_hasComponentErrors(context, popup);
   }
   public void processAction(ActionEvent event)
     throws AbortProcessingException
   {
     FacesContext context = FacesContext.getCurrentInstance();
     UIComponent source = (UIComponent) event.getSource();
     UIComponent popup = _findPopup(source);
     String popupId = popup.getClientId(context);
     if (_hidePopup(context, popup))
     {
       StringBuilder script = new StringBuilder();
       script.append("var popup = AdfPage.PAGE.findComponent('")
             .append(popupId).append("'); ")
             .append("if (popup.isPopupVisible()) { ")
             .append("popup.hide();}");
       ExtendedRenderKitService erks =
         Service.getService(context.getRenderKit(),
                            ExtendedRenderKitService.class);
       erks.addScript(context, script.toString());
     }
     else
     {
       StringBuilder script = new StringBuilder();
       script.append("AdfPage.PAGE.showMessages();");
       ExtendedRenderKitService erks =
         Service.getService(context.getRenderKit(),
                            ExtendedRenderKitService.class);
       erks.addScript(context, script.toString());
     }
   }
 }
 ...
 ...
 public class PopupCancelActionListener implements ActionListener
 {
   ...
   ...
   public void processAction(ActionEvent event)
     throws AbortProcessingException
   {
     FacesContext context = FacesContext.getCurrentInstance();
     UIComponent source = (UIComponent) event.getSource();
     UIComponent popup = _findPopup(source);
     String popupId = popup.getClientId(context);
     StringBuilder script = new StringBuilder();
     script.append("var popup = AdfPage.PAGE.findComponent('")
           .append(popupId).append("'); ")
           .append("if (popup.isPopupVisible()) { ")
           .append("popup.cancel();}");
     ExtendedRenderKitService erks =
       Service.getService(context.getRenderKit(),
                          ExtendedRenderKitService.class);
     erks.addScript(context, script.toString());
   }
 }
    

Understanding Cancel/Close Dismissal

The dialog's cancel button and close icon both raise a client only dialog event. A dialogListener will not be notified when the dialog is dismissed using these two commands. However, these commands translate into a popup-canceled event of the owning inline popup component. Server-side listeners can be registered with the parent af:popup component and will be invoked when the dialog is dismissed using a closed dialog event outcome. See af:popup for more information on cancel dismissal.

Events:

Type Phases Description
oracle.adf.view.rich.event.DialogEvent Invoke
Application
The dialog event is delivered when a dialog is triggered.
org.apache.myfaces.trinidad.event.AttributeChangeEvent Invoke
Application
Apply
Request
Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.

Field Summary
static org.apache.myfaces.trinidad.bean.PropertyKey AFFIRMATIVE_TEXT_AND_ACCESS_KEY_KEY
           
static java.lang.String BUTTON_BAR_FACET
           
static org.apache.myfaces.trinidad.bean.PropertyKey CANCEL_TEXT_AND_ACCESS_KEY_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CANCEL_VISIBLE_KEY
          Deprecated. 
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CLOSE_ICON_VISIBLE_KEY
           
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static org.apache.myfaces.trinidad.bean.PropertyKey CONTENT_HEIGHT_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CONTENT_WIDTH_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey HELP_TOPIC_ID_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey MODAL_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey NO_TEXT_AND_ACCESS_KEY_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey OK_VISIBLE_KEY
          Deprecated. 
static org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey SHORT_DESC_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey TITLE_ICON_SOURCE_KEY
           
static org.apache.myfaces.trinidad.bean.PropertyKey TITLE_KEY
           
static org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE
           
static java.lang.String TYPE_CANCEL
           
static org.apache.myfaces.trinidad.bean.PropertyKey TYPE_KEY
           
static java.lang.String TYPE_NONE
           
static java.lang.String TYPE_OK
           
static java.lang.String TYPE_OK_CANCEL
           
static java.lang.String TYPE_YES_NO
           
static java.lang.String TYPE_YES_NO_CANCEL
           
static org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY
          Deprecated. 

 

Fields inherited from class oracle.adf.view.rich.component.UIXDialog
DIALOG_LISTENER_KEY

 

Fields inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
BINDING_KEY, ID_KEY, RENDERED_KEY, RENDERER_TYPE_KEY, TRANSIENT_KEY

 

Fields inherited from class javax.faces.component.UIComponent
bindings

 

Constructor Summary
  RichDialog()
          Construct an instance of the RichDialog.
protected RichDialog(java.lang.String rendererType)
          Construct an instance of the RichDialog.

 

Method Summary
 java.lang.String getAffirmativeTextAndAccessKey()
          Gets An attribute that simultaneously sets the textual label of the ok and yes footer buttons as well as the an optional accessKey character used to gain quick access to the button.
protected  org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
           
 javax.faces.component.UIComponent getButtonBar()
          A panel containing custom buttons.
 java.lang.String getCancelTextAndAccessKey()
          Gets An attribute that simultaneously sets the textual label of the cancel footer button as well as the an optional accessKey character used to gain quick access to the button.
 java.util.Set getClientAttributes()
          Gets a set of client attribute names.
 ClientListenerSet getClientListeners()
          Gets a set of client listeners.
 int getContentHeight()
          Gets the height of the content area of the dialog.
 int getContentWidth()
          Gets the width of the content area of the dialog.
 java.lang.String getCustomizationId()
          Gets This attribute is deprecated.
 java.lang.String getFamily()
           
 java.lang.String getHelpTopicId()
          Gets the id used to look up a topic in a helpProvider.
 java.lang.String getInlineStyle()
          Gets the CSS styles to use for this component.
 java.lang.String getNoTextAndAccessKey()
          Gets An attribute that simultaneously sets the textual label of the no footer button as well as the an optional accessKey character used to gain quick access to the button.
 java.lang.String[] getPartialTriggers()
          Gets the IDs of the components that should trigger a partial update.
 java.lang.String getShortDesc()
          Gets the short description of the component.
 java.lang.String getStyleClass()
          Gets a CSS style class to use for this component.
 java.lang.String getTitle()
          Gets the title of the window.
 java.lang.String getTitleIconSource()
          Gets the URI specifying the location of the title icon source.
 java.lang.String getType()
          Gets the buttons in the dialog.
 boolean isCancelVisible()
          Deprecated. cancelVisible is deprecated. Use the type attribute.
 boolean isClientComponent()
          Gets whether a client-side component will be generated.
 boolean isCloseIconVisible()
          Gets whether the close icon is visible.
 boolean isModal()
          Gets if the dialog is modal; by default, true.
 boolean isOkVisible()
          Deprecated. okVisible is deprecated. Use the type attribute.
 boolean isVisible()
          Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component.
 void setAffirmativeTextAndAccessKey(java.lang.String affirmativeTextAndAccessKey)
          Sets An attribute that simultaneously sets the textual label of the ok and yes footer buttons as well as the an optional accessKey character used to gain quick access to the button.
 void setButtonBar(javax.faces.component.UIComponent buttonBarFacet)
          A panel containing custom buttons.
 void setCancelTextAndAccessKey(java.lang.String cancelTextAndAccessKey)
          Sets An attribute that simultaneously sets the textual label of the cancel footer button as well as the an optional accessKey character used to gain quick access to the button.
 void setCancelVisible(boolean cancelVisible)
          Deprecated. cancelVisible is deprecated. Use the type attribute.
 void setClientAttributes(java.util.Set clientAttributes)
          Sets a set of client attribute names.
 void setClientComponent(boolean clientComponent)
          Sets whether a client-side component will be generated.
 void setClientListeners(ClientListenerSet clientListeners)
          Sets a set of client listeners.
 void setCloseIconVisible(boolean closeIconVisible)
          Sets whether the close icon is visible.
 void setContentHeight(int contentHeight)
          Sets the height of the content area of the dialog.
 void setContentWidth(int contentWidth)
          Sets the width of the content area of the dialog.
 void setCustomizationId(java.lang.String customizationId)
          Sets This attribute is deprecated.
 void setHelpTopicId(java.lang.String helpTopicId)
          Sets the id used to look up a topic in a helpProvider.
 void setInlineStyle(java.lang.String inlineStyle)
          Sets the CSS styles to use for this component.
 void setModal(boolean modal)
          Sets if the dialog is modal; by default, true.
 void setNoTextAndAccessKey(java.lang.String noTextAndAccessKey)
          Sets An attribute that simultaneously sets the textual label of the no footer button as well as the an optional accessKey character used to gain quick access to the button.
 void setOkVisible(boolean okVisible)
          Deprecated. okVisible is deprecated. Use the type attribute.
 void setPartialTriggers(java.lang.String[] partialTriggers)
          Sets the IDs of the components that should trigger a partial update.
 void setShortDesc(java.lang.String shortDesc)
          Sets the short description of the component.
 void setStyleClass(java.lang.String styleClass)
          Sets a CSS style class to use for this component.
 void setTitle(java.lang.String title)
          Sets the title of the window.
 void setTitleIconSource(java.lang.String titleIconSource)
          Sets the URI specifying the location of the title icon source.
 void setType(java.lang.String type)
          Sets the buttons in the dialog.
 void setVisible(boolean visible)
          Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component.

 

Methods inherited from class oracle.adf.view.rich.component.UIXDialog
addDialogListener, broadcast, getDialogListener, getDialogListeners, queueEvent, removeDialogListener, setDialogListener, setDialogListener

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponentBase
adaptMethodBinding, addAttributeChange, addAttributeChangeListener, addFacesListener, broadcastToMethodBinding, broadcastToMethodExpression, createFacesBean, decode, decodeChildren, decodeChildrenImpl, encodeAll, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributeChangeListener, getAttributeChangeListeners, getAttributes, getBooleanProperty, getChildCount, getChildren, getClientId, getContainerClientId, getFacesBean, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacetNames, getFacets, getFacetsAndChildren, getId, getIntProperty, getLifecycleRenderer, getParent, getProperty, getPropertyKey, getRenderer, getRendererType, getRendersChildren, getValueBinding, getValueExpression, invokeOnChildrenComponents, invokeOnComponent, invokeOnNamingContainerComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, removeAttributeChangeListener, removeFacesListener, restoreState, saveState, setAttributeChangeListener, setAttributeChangeListener, setBooleanProperty, setId, setIntProperty, setParent, setProperty, setRendered, setRendererType, setTransient, setValueBinding, setValueExpression, toString, updateChildren, updateChildrenImpl, validateChildren, validateChildrenImpl

 

Methods inherited from class org.apache.myfaces.trinidad.component.UIXComponent
addPartialTarget, isVisitable, partialEncodeVisit, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, processFlattenedChildren, setPartialTarget, setUpEncodingContext, setupVisitingContext, tearDownEncodingContext, tearDownVisitingContext, visitTree, visitTree

 

Methods inherited from class javax.faces.component.UIComponent
getContainerClientId

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Field Detail

TYPE_NONE

public static final java.lang.String TYPE_NONE
See Also:
Constant Field Values

TYPE_OK

public static final java.lang.String TYPE_OK
See Also:
Constant Field Values

TYPE_CANCEL

public static final java.lang.String TYPE_CANCEL
See Also:
Constant Field Values

TYPE_YES_NO

public static final java.lang.String TYPE_YES_NO
See Also:
Constant Field Values

TYPE_OK_CANCEL

public static final java.lang.String TYPE_OK_CANCEL
See Also:
Constant Field Values

TYPE_YES_NO_CANCEL

public static final java.lang.String TYPE_YES_NO_CANCEL
See Also:
Constant Field Values

TYPE

public static final org.apache.myfaces.trinidad.bean.FacesBean.Type TYPE

INLINE_STYLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey INLINE_STYLE_KEY

STYLE_CLASS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey STYLE_CLASS_KEY

SHORT_DESC_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey SHORT_DESC_KEY

VISIBLE_KEY

@Deprecated
public static final org.apache.myfaces.trinidad.bean.PropertyKey VISIBLE_KEY
Deprecated. 

CUSTOMIZATION_ID_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CUSTOMIZATION_ID_KEY

CLIENT_COMPONENT_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_COMPONENT_KEY

CLIENT_ATTRIBUTES_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_ATTRIBUTES_KEY

PARTIAL_TRIGGERS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey PARTIAL_TRIGGERS_KEY

CLIENT_LISTENERS_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLIENT_LISTENERS_KEY

TITLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey TITLE_KEY

TITLE_ICON_SOURCE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey TITLE_ICON_SOURCE_KEY

CLOSE_ICON_VISIBLE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CLOSE_ICON_VISIBLE_KEY

HELP_TOPIC_ID_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey HELP_TOPIC_ID_KEY

CONTENT_HEIGHT_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CONTENT_HEIGHT_KEY

CONTENT_WIDTH_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CONTENT_WIDTH_KEY

AFFIRMATIVE_TEXT_AND_ACCESS_KEY_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey AFFIRMATIVE_TEXT_AND_ACCESS_KEY_KEY

CANCEL_TEXT_AND_ACCESS_KEY_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey CANCEL_TEXT_AND_ACCESS_KEY_KEY

NO_TEXT_AND_ACCESS_KEY_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey NO_TEXT_AND_ACCESS_KEY_KEY

TYPE_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey TYPE_KEY

MODAL_KEY

public static final org.apache.myfaces.trinidad.bean.PropertyKey MODAL_KEY

OK_VISIBLE_KEY

@Deprecated
public static final org.apache.myfaces.trinidad.bean.PropertyKey OK_VISIBLE_KEY
Deprecated. 

CANCEL_VISIBLE_KEY

@Deprecated
public static final org.apache.myfaces.trinidad.bean.PropertyKey CANCEL_VISIBLE_KEY
Deprecated. 

BUTTON_BAR_FACET

public static final java.lang.String BUTTON_BAR_FACET
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

Constructor Detail

RichDialog

public RichDialog()
Construct an instance of the RichDialog.

RichDialog

protected RichDialog(java.lang.String rendererType)
Construct an instance of the RichDialog.

Method Detail

getButtonBar

public final javax.faces.component.UIComponent getButtonBar()
A panel containing custom buttons.

setButtonBar

public final void setButtonBar(javax.faces.component.UIComponent buttonBarFacet)
A panel containing custom buttons.

getInlineStyle

public final java.lang.String getInlineStyle()
Gets the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style.
Returns:
the new inlineStyle value

setInlineStyle

public final void setInlineStyle(java.lang.String inlineStyle)
Sets the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style.
Parameters:
inlineStyle - the new inlineStyle value

getStyleClass

public final java.lang.String getStyleClass()
Gets a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'.
Returns:
the new styleClass value

setStyleClass

public final void setStyleClass(java.lang.String styleClass)
Sets a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'.
Parameters:
styleClass - the new styleClass value

getShortDesc

public final java.lang.String getShortDesc()
Gets the short description of the component. This text is commonly used by user agents to display tooltip help text, in which case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window. For components that support the helpTopicId attribute it is recommended that helpTopicId is used as it is more flexible and is more accessibility-compliant.
Returns:
the new shortDesc value

setShortDesc

public final void setShortDesc(java.lang.String shortDesc)
Sets the short description of the component. This text is commonly used by user agents to display tooltip help text, in which case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window. For components that support the helpTopicId attribute it is recommended that helpTopicId is used as it is more flexible and is more accessibility-compliant.
Parameters:
shortDesc - the new shortDesc value

isVisible

@Deprecated
public final boolean isVisible()
Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component.
Gets the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. In most cases, use the "rendered" property instead of the "visible" property.
Returns:
the new visible value

setVisible

@Deprecated
public final void setVisible(boolean visible)
Deprecated. visible has been deprecated. Use the af:showPopupBehavior tag or the show/hide methods on the popup client component.
Sets the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. In most cases, use the "rendered" property instead of the "visible" property.
Parameters:
visible - the new visible value

getCustomizationId

public final java.lang.String getCustomizationId()
Gets This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.
Returns:
the new customizationId value

setCustomizationId

public final void setCustomizationId(java.lang.String customizationId)
Sets This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.
Parameters:
customizationId - the new customizationId value

isClientComponent

public final boolean isClientComponent()
Gets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
Returns:
the new clientComponent value

setClientComponent

public final void setClientComponent(boolean clientComponent)
Sets whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
Parameters:
clientComponent - the new clientComponent value

getClientAttributes

public final java.util.Set getClientAttributes()
Gets a set of client attribute names.
Returns:
the new clientAttributes value

setClientAttributes

public final void setClientAttributes(java.util.Set clientAttributes)
Sets a set of client attribute names.
Parameters:
clientAttributes - the new clientAttributes value

getPartialTriggers

public final java.lang.String[] getPartialTriggers()
Gets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
Returns:
the new partialTriggers value

setPartialTriggers

public final void setPartialTriggers(java.lang.String[] partialTriggers)
Sets the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
Parameters:
partialTriggers - the new partialTriggers value

getClientListeners

public final ClientListenerSet getClientListeners()
Gets a set of client listeners.
Returns:
the new clientListeners value

setClientListeners

public final void setClientListeners(ClientListenerSet clientListeners)
Sets a set of client listeners.
Parameters:
clientListeners - the new clientListeners value

getTitle

public final java.lang.String getTitle()
Gets the title of the window.
Returns:
the new title value

setTitle

public final void setTitle(java.lang.String title)
Sets the title of the window.
Parameters:
title - the new title value

getTitleIconSource

public final java.lang.String getTitleIconSource()
Gets the URI specifying the location of the title icon source. The title icon will typically be displayed in the top left corner of the window
Returns:
the new titleIconSource value

setTitleIconSource

public final void setTitleIconSource(java.lang.String titleIconSource)
Sets the URI specifying the location of the title icon source. The title icon will typically be displayed in the top left corner of the window
Parameters:
titleIconSource - the new titleIconSource value

isCloseIconVisible

public final boolean isCloseIconVisible()
Gets whether the close icon is visible.
Returns:
the new closeIconVisible value

setCloseIconVisible

public final void setCloseIconVisible(boolean closeIconVisible)
Sets whether the close icon is visible.
Parameters:
closeIconVisible - the new closeIconVisible value

getHelpTopicId

public final java.lang.String getHelpTopicId()
Gets the id used to look up a topic in a helpProvider. If provided, a help icon will appear in the title bar.
Returns:
the new helpTopicId value

setHelpTopicId

public final void setHelpTopicId(java.lang.String helpTopicId)
Sets the id used to look up a topic in a helpProvider. If provided, a help icon will appear in the title bar.
Parameters:
helpTopicId - the new helpTopicId value

getContentHeight

public final int getContentHeight()
Gets the height of the content area of the dialog.
Returns:
the new contentHeight value

setContentHeight

public final void setContentHeight(int contentHeight)
Sets the height of the content area of the dialog.
Parameters:
contentHeight - the new contentHeight value

getContentWidth

public final int getContentWidth()
Gets the width of the content area of the dialog.
Returns:
the new contentWidth value

setContentWidth

public final void setContentWidth(int contentWidth)
Sets the width of the content area of the dialog.
Parameters:
contentWidth - the new contentWidth value

getAffirmativeTextAndAccessKey

public final java.lang.String getAffirmativeTextAndAccessKey()
Gets An attribute that simultaneously sets the textual label of the ok and yes footer buttons as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Returns:
the new affirmativeTextAndAccessKey value

setAffirmativeTextAndAccessKey

public final void setAffirmativeTextAndAccessKey(java.lang.String affirmativeTextAndAccessKey)
Sets An attribute that simultaneously sets the textual label of the ok and yes footer buttons as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Parameters:
affirmativeTextAndAccessKey - the new affirmativeTextAndAccessKey value

getCancelTextAndAccessKey

public final java.lang.String getCancelTextAndAccessKey()
Gets An attribute that simultaneously sets the textual label of the cancel footer button as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Returns:
the new cancelTextAndAccessKey value

setCancelTextAndAccessKey

public final void setCancelTextAndAccessKey(java.lang.String cancelTextAndAccessKey)
Sets An attribute that simultaneously sets the textual label of the cancel footer button as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Parameters:
cancelTextAndAccessKey - the new cancelTextAndAccessKey value

getNoTextAndAccessKey

public final java.lang.String getNoTextAndAccessKey()
Gets An attribute that simultaneously sets the textual label of the no footer button as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Returns:
the new noTextAndAccessKey value

setNoTextAndAccessKey

public final void setNoTextAndAccessKey(java.lang.String noTextAndAccessKey)
Sets An attribute that simultaneously sets the textual label of the no footer button as well as the an optional accessKey character used to gain quick access to the button. The accessKey is identified using conventional ampersand ('&') notation.

For example, setting this attribute to "T&amp;ext" will set the textual label to "Text" and the accessKey to 'e'.

For accessibility reasons, the access key functionality is not supported in screen reader mode.

If the same accessKey appears in multiple locations in the same page of output, the rendering user agent will cycle among the elements accessed by the similar keys.

This accessKey is sometimes referred to as the "mnemonic".

Note that the accessKey is triggered by browser-specific and platform-specific modifier keys. It even has browser-specific meaning. For example, Internet Explorer 7.0 will set focus when you press Alt+<accessKey>. Firefox 2.0 on some operating systems you press Alt+Shift+<accessKey>. Firefox 2.0 on other operating systems you press Control+<accessKey>. Refer to your browser's documentation for how it treats accessKey.

Parameters:
noTextAndAccessKey - the new noTextAndAccessKey value

getType

public final java.lang.String getType()
Gets the buttons in the dialog. For example, value yesNoCancel means there will be "Yes", "No" and "Cancel" buttons in the dialog.
Returns:
the new type value

setType

public final void setType(java.lang.String type)
Sets the buttons in the dialog. For example, value yesNoCancel means there will be "Yes", "No" and "Cancel" buttons in the dialog.
Parameters:
type - the new type value

isModal

public final boolean isModal()
Gets if the dialog is modal; by default, true. A modal dialog does not allow the user to make changes on the base page until the dialog is closed. A non-modal dialog will allow the user to make changes on the base page; if the user navigates away from the base page, the dialog will close.
Returns:
the new modal value

setModal

public final void setModal(boolean modal)
Sets if the dialog is modal; by default, true. A modal dialog does not allow the user to make changes on the base page until the dialog is closed. A non-modal dialog will allow the user to make changes on the base page; if the user navigates away from the base page, the dialog will close.
Parameters:
modal - the new modal value

isOkVisible

@Deprecated
public final boolean isOkVisible()
Deprecated. okVisible is deprecated. Use the type attribute.
Gets the value that specifies if the OK button is visible. It will be ignored when the type attribute value is not equal to "okCancel".
Returns:
the new okVisible value

setOkVisible

@Deprecated
public final void setOkVisible(boolean okVisible)
Deprecated. okVisible is deprecated. Use the type attribute.
Sets the value that specifies if the OK button is visible. It will be ignored when the type attribute value is not equal to "okCancel".
Parameters:
okVisible - the new okVisible value

isCancelVisible

@Deprecated
public final boolean isCancelVisible()
Deprecated. cancelVisible is deprecated. Use the type attribute.
Gets the value that specifies if the Cancel button is visible. It will be ignored when the type attribute value is not equal to "okCancel".
Returns:
the new cancelVisible value

setCancelVisible

@Deprecated
public final void setCancelVisible(boolean cancelVisible)
Deprecated. cancelVisible is deprecated. Use the type attribute.
Sets the value that specifies if the Cancel button is visible. It will be ignored when the type attribute value is not equal to "okCancel".
Parameters:
cancelVisible - the new cancelVisible value

getFamily

public java.lang.String getFamily()
Overrides:
getFamily in class UIXDialog

getBeanType

protected org.apache.myfaces.trinidad.bean.FacesBean.Type getBeanType()
Overrides:
getBeanType in class UIXDialog

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-02


Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.