Class: ojDialog

Oracle® JavaScript Extension Toolkit (JET)
2.0.0

E70325-01

QuickNav

Options


Sub-ID's

oj. ojDialog extends oj.baseComponent

Version:
  • 2.0.0
Since:
  • 0.6

JET Dialog Component

Description: Themeable, WAI-ARIA-compliant dialog component. A dialog is a floating window that typically contains a title bar and a content area. The dialog window can be moved by dragging on the title area, and closed with the 'x' icon (by default). Dialogs can also be resized by dragging on edges or corners of the dialog component.

If the content length exceeds the maximum height, a scrollbar will automatically appear.

A bottom button bar and semi-transparent modal overlay layer are common options that can be added.

Styling

Class(es) Description
oj-dialog-header

Optional. If oj-dialog-header is omitted, a header will automatically be created.

For automically created headers (when oj-dialog-header is not part of the user's markup), the title of the header is the dialog title, and a close button is created.

oj-dialog-body

Expected. Formats the body of the dialog.

oj-dialog-footer

Optional. Formats the footer of the dialog. Omit if the dialog has no footer.

oj-dialog-footer-separator

A separator between the dialog body and the dialog footer can be added by using a second style class ( oj-dialog-footer-separator ) in the footer. So use:

  • oj-dialog-footer oj-dialog-footer-separator
to add a footer separator to the dialog.

See the demo section for a live example of the footer separator.

oj-progressbar-embedded

Optional. Used to format a progress bar embedded in the dialog header.

Note that the dialog component wraps additional divs around the user's content and also performs other DOM manipulations. Thus, the user should be careful if they wish to engage in advanced coding approaches. In general, it is better to target DOM elements by id or class name (e.g., developers should not rely on relative positioning of dialog DOM elements).

Focus

Upon opening a dialog, focus is automatically moved to the first item that matches the following:

  1. The first element within the dialog with the autofocus attribute
  2. The first :tabbable element within the dialog body
  3. The first :tabbable element within the dialog footer
  4. The dialog's close button
  5. The dialog itself

While open, the dialog widget ensures that tabbing cycles focus between elements within the dialog itself, not elements outside of it. Modal dialogs additionally prevent mouse users fro clicking on elements outside of the dialog.

Upon closing a dialog, focus is automatically returned to the element that had focus when the dialog was opened.

Touch End User Information

Target Gesture Action
Dialog Close Icon Tap Close the dialog.

Keyboard End User Information

The JET Dialog can be closed with keyboard actions:

Target Key Action
Dialog Esc Close the dialog.
Dialog Close Icon Enter or Space Close the dialog.

Sizing

Dialog dimensions, including height, width, min-width, max-width, min-height and max-height are defined with css variables. The default dialog dimensions are the following:

  • height: auto
  • width: 300px
  • min-width: 200px
In most cases, you will want to use the default height:auto, since this will automatically adjust the height based on the content.

Dialog dimensions can be set using rootAttributes:


 <div id="wideDialog" title="Wide Dialog" style=""
      data-bind="ojComponent:{component: 'ojDialog', initialVisibility: 'show',
		  rootAttributes: { style: 'width: 400px; min-width: 100px; max-width 500px;'}}">
      <div class="oj-dialog-body">
        <p> Dialog Text
      </div>
 </div>
To dynamically change a dialog dimension (e.g., change a dimension after the dialog has been created), the 'widget' syntax is required:

$("#wideDialog").ojDialog('widget').css{'width', '400px'}

Accessibility

role

By default, the role will be set to dialog. This can be observed by inspecting the DOM:

 <div class="ojdialog ..." role="dialog">
This can be changed using the role option. WAI-ARIA recommends that role="dialog" be used if the dialog expects input (such as text input), otherwise, use the role option to assign role="alertdialog".

labeled-by

For default headers, the dialog component takes care of labeled-by for you. User-defined headers require additional work on the user's part:
  • Default Headers
  • For default headers, the labeled-by attribute will be generated automatically (and set to the id of the title).
  • User-defined Headers
  • For user-defined headers, the the labeled-by attribute should be defined in the user's markup. Please refer to the demos for examples.

Reparenting

When dialogs are open, they will be reparented into a common container in the document body and reparented back when closed. Within this container in the body, dialogs will always be top rooted but other types of popups used within an open dialog will be reparented within the dialog's layer. The dialog's layer defines its z-index weight "stacking context" and marked by the "oj-dialog-layer" style. The goal of this design is to maintain as much of the page author's document structure while avoiding most of the clipping and positioning issues of a completely inline design. Dialogs are assigned the same z-index values The layering between dialog peers reflect the opening order. In addition, the dialog that has active focus will be assigned a greater z-index by way of the "oj-focus-within" pseudo selector applied with "oj-dialog-layer" selector. The page author has control over z-index weights by way of the "oj-dialog-layer" selector.

There are known caveats with this design. However, these scenarios are considered "bad use" based on our JET popup strategy.

  1. Events raised within the dialog will not bubble up to the dialog's original ancestors. Instead, listeners for menu events should be applied to either the dialog's root element, or the document.
  2. Likewise, developers should not use CSS descendant selectors, or similar logic, that assumes that the dialog will remain a child of its original parent.
  3. Dialogs containing iframes are problematic. The iframe elements "may" fire a HTTP GET request for its src attribute each time the iframe is reparented in the document.
  4. In some browsers, reparenting a dialog that contains elements having overflow, will cause these overflow elements to reset their scrollTop.

Reading direction

Setting the reading direction (LTR or RTL) is supported by setting the "dir" attribute on the <html> element of the page. As with any JET component, in the unusual case that the reading direction is changed post-init, the dialog must be refresh()ed, or the page must be reloaded.

Pseudo-selectors

The :oj-dialog pseudo-selector can be used in jQuery expressions to select JET Dialogs. For example:

$( ":oj-dialog" ) // selects all JET Dialogs on the page
$myEventTarget.closest( ":oj-dialog" ) // selects the closest ancestor that is a JET Dialog

Additional Examples

The following defines a basic dialog, with a cancel and an ok button in the footer:



<div id="dialog" class="ojDialog" title="ojDialog Title">
    <div class="oj-dialog-body">
        <p>Dialog Text</p>
    </div>
    <div class="oj-dialog-footer">
       <button id="buttonCancel" data-bind="ojComponent:
             { component: 'ojButton', label: 'OK'}"> </button>
       <button data-bind="ojComponent:
             { component: 'ojButton', label: 'Cancel'}"> </button>
    </div>
</div>

Note that you will need to define your own event handlers for the ok and close buttons (see the demos for examples of this).

A dialog with user-defined header is shown next. Arbitrary header content can be defined using a user-defined header.



<div id="dialog" class="ojDialog" title="ojDialog Title">
  <div class="oj-dialog-header" aria-labelledby="dialog-title-id">
    <span id="dialog-title-id" class="oj-dialog-title"> User Defined Header</span>
   </div>
   <div class="oj-dialog-body">
       <p>Dialog Text</p>
       <br>
   </div>
   <div class="oj-dialog-footer">
      <button data-bind="ojComponent:
          { component: 'ojButton', label: 'OK'}"> </button>
      <button id="buttonCancel" class="" data-bind="ojComponent:
          { component: 'ojButton', label: 'Cancel'}"> </button>
   </div>
</div>

JET for jQuery UI developers

This section summarizes the major differences between the JQueryUI dialog and the JET dialog API.

Options added to JET Dialog

One additional option has been added to the JET dialog:

JQueryUI Dialog Option JET Dialog Option
role
The JET Dialog option allows the developer to set the WAI-ARIA role. The role option is not part of the JQueryUI dialog.

Options Renamed between JQueryUI Dialog and JET Dialog

The following options have been renamed between the JQueryUI dialog and the JET dialog.

JQueryUI Dialog Option JET Dialog Option
autoOpen initialVisibility
closeOnEscape cancelBehavior
draggable dragAffordance
modal modality
resizable resizeBehavior

Also note that the JQueryUI dialog defines these options as booleans, while the JET dialog defines these options as strings.

Options in JQueryUI Dialog but not In JET Dialog

The following options are part of the JQueryUI dialog but are not options in JET Dialog:

JQueryUI Dialog Option JET Dialog Approach
appendTo Use the jquery appendTo() instead
button Buttons are added directly to HTML markup
width, height Use css variables width, height
minWidth, maxWidth, minHeight, maxHeight Use css variables min-width, max-width, min-height, max-height
show, hide Use css classes instead, e.g., display: none to hide an element

Event Names

Event names for all JET components are prefixed with "oj", instead of component-specific prefixes like "dialog". E.g. the JQUI dialogcreate event is ojcreate in JET, as shown in the doc for that event.

Initializer

.ojDialog(options)

Creates a JET Dialog.
Parameters:
Name Type Argument Description
options Object <optional>
a map of option-value pairs to set on the component
Source:
Examples

Initialize a (modal) dialog with no options specified:

$( ".selector" ).ojDialog();

Create a modeless dialog:

$("#dialog").ojDialog(modality: "modeless"});

Options

cancelBehavior :string

Specifies the cancel behavior of the dialog. The following are valid values:
  • "icon" - (the default) (a) a close icon will automatically be created, and (b) the dialog will close when it has focus and user presses the escape (ESC) key.
  • "none" - no actions will be associated with the escape key.
  • "escape" - the dialog will close when it has focus and user presses the escape (ESC) key. A close icon will not automatically be created.
Note that the cancelBehavior applies to both automatic and user-defined headers. So by default, a user-defined header will have a system generated close icon.
Default Value:
  • "icon"
Source:
Examples

Initialize the dialog to disable the default cancelBehavior

$(".selector" ).ojDialog( {cancelBehavior: "none" } );

Get or set the cancelBehavior option, after initialization:

// getter
var cancelBehavior = $(".selector" ).ojDialog( "option", "cancelBehavior" );

// setter
$(".selector" ).ojDialog( "option", "cancelBehavior", "none");

contextMenu :Object

JQ selector identifying the JET Menu that the component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the specified JET Menu.

To specify a JET context menu on a DOM element that is not a JET component, see the ojContextMenu binding.

To make the page semantically accurate from the outset, applications are encouraged to specify the context menu via the standard HTML5 syntax shown in the below example. When the component is initialized, the context menu thus specified will be set on the component.

After create time, the contextMenu option should be set via this API, not by setting the DOM attribute.

Default Value:
  • null
Inherited From:
Source:
Examples

Initialize a JET component with a context menu:

// via recommended HTML5 syntax:
<div id="myComponent" contextmenu="myMenu" data-bind="ojComponent: { ... }>

// via JET initializer (less preferred) :
// Foo is the component, e.g., InputText, InputNumber, Select, etc.
$( ".selector" ).ojFoo({ "contextMenu": "#myMenu" });

Get or set the contextMenu option, after initialization:

// getter
// Foo is the component, e.g., InputText, InputNumber, Select, etc.
var menu = $( ".selector" ).ojFoo( "option", "contextMenu" );

// setter
// Foo is the component, e.g., InputText, InputNumber, Select, etc.
$( ".selector" ).ojFoo( "option", "contextMenu", ".my-marker-class" );

Set a JET context menu on an ordinary HTML element:

<a href="#" id="myAnchor" contextmenu="myMenu" data-bind="ojContextMenu: {}">Some text

dragAffordance :string

Specifies the drag affordance. If set to "title-bar" (the default) the dialog will be draggable by the title bar. If "none", the dialog will not be draggable.
Default Value:
  • "title-bar"
Source:
Examples

Initialize the dialog to disable dragging dragAffordance

$(".selector" ).ojDialog( {dragAffordance: "none" } );

Get or set the dragAffordance option, after initialization:

// getter
var dragAffordance = $(".selector" ).ojDialog( "option", "dragAffordance" );

// setter
$(".selector" ).ojDialog( "option", "dragAffordance", "none");

initialVisibility :string

Set the initial visibility of the dialog. If set to "show", the dialog will automatically open upon initialization. If "hide", the dialog will stay hidden until the open() method is called.

Default Value:
  • "hide"
Source:
Examples

Initialize the dialog with the initialVisibility option specified:

$(".selector" ).ojDialog( {initialVisibility: "show" } );

Get or set the initialVisibility option, after initialization:

// getter
var initialVisibility = $(".selector" ).ojDialog( "option", "initialVisibility" );

// setter
$(".selector" ).ojDialog( "option", "initialVisibility", "show");

modality :string

The modality of the dialog. Valid values are:
  • "modal" - (the default) The dialog is modal. Interactions with other page elements are disabled. Modal dialogs overlay other page elements.
  • "modeless" - defines a modeless dialog.
Default Value:
  • "modal"
Source:
Examples

Initialize the dialog to a specific modality modality

$(".selector" ).ojDialog( {modality: "modal" } );

Get or set the modality option, after initialization:

// getter
var modality = $(".selector" ).ojDialog( "option", "modality" );

// setter
$(".selector" ).ojDialog( "option", "modality", "modal");

position :Object

Position object is defined by the jquery position API and is used to establish the location the dialog will appear relative to another element. The postion object contains the following properties: "my", "at", "of", "colision", "using" and "within".

The "my" and "at" properties defines aligment points relative to the dialog and other element. The "my" property represents the dialogs alignment where the "at" property represents the other element that can be identified by "of" or defauts to the launcher when the dialog opens. The values of these properties describe a "horizontal vertical" location.

Acceptable "horizontal" alignments values are: "right", "center", "left", "start", "end". Note: Jet has added "start" and "end" options to be more RTL friendly. The Jet values of "start" and "end" normalize to "right" or "left" depending on the direction of the document.

Acceptable "vertical" alignment values are: "top", "center" and "bottom".

The following is a short summary of the most interesting positon properties:
  • my - A "vertical horizontal" rule that defines the location of the dialog used for alignment.
  • at - A "vertical horizontal" rule that defines the location of the other element for used alignment. The other element is defined by "of" or defaults to the open launcher argument if not specified.
Default Value:
  • {my: "center", at: "center", collision: "fit"}
Source:
Examples

Initialize the dialog with position option specified:

$( ".selector" ).ojDialog( { "position": {"my": "left top", "at": "right top"} } );

Get or set the position option, after initialization:

// getter
var position = $( ".selector" ).ojDialog( "option", "position" );

// setter
$( ".selector" ).ojDialog( "option", "position", {"my": "start bottom", "at": "end+14 top" } );

position.at :string

Default Value:
  • "center"
Source:

position.collision :string

Default Value:
  • "fit"
Source:

position.my :string

Default Value:
  • "center"
Source:

position.of :Object

Default Value:
  • "window"
Source:

resizeBehavior :string

The resizeBehavior of the dialog. "resizable" (default) makes the dialog resizable. "none" disables dialog resizability.
Default Value:
  • "resizable"
Source:
Examples

Initialize the dialog to a specific resizeBehavior resizeBehavior

$(".selector" ).ojDialog( {resizeBehavior: "none" } );

Get or set the resizeBehavior option, after initialization:

// getter
var resizeBehavior = $(".selector" ).ojDialog( "option", "resizeBehavior" );

// setter
$(".selector" ).ojDialog( "option", "resizeBehavior", "none");

role :string

The WAI-ARIA role of the dialog. By default, role="dialog" is added to the generated HTML markup that surrounds the dialog. When used as an alert dialog, the user should set role to "alertdialog".
Default Value:
  • "dialog"
Source:
Examples

Initialize the dialog with the role option specified:

$(".selector" ).ojDialog( {role: "alertdialog" } );

Get or set the role option, after initialization:

// getter
var role = $(".selector" ).ojDialog( "option", "role" );

// setter
$(".selector" ).ojDialog( "option", "role", "alertdialog");

rootAttributes :Object

Attributes specified here will be set on the component's root DOM element at creation time. This is particularly useful for components like Dialog that wrap themselves in a new root element at creation time.

The supported attributes are id, which overwrites any existing value, and class and style, which are appended to the current class and style, if any.

Setting this option after component creation has no effect. At that time, the root element already exists, and can be accessed directly via the widget method, per the second example below.

Default Value:
  • null
Inherited From:
Source:
Examples

Initialize a JET component, specifying a set of attributes to be set on the component's root DOM element:

// Foo is the component, e.g., Menu, Button, InputText, InputNumber, Select, etc.
$( ".selector" ).ojFoo({ "rootAttributes": {
  "id": "myId",
  "style": "max-width:100%; color:blue;",
  "class": "my-class"
}});

After initialization, rootAttributes should not be used. It is not needed at that time, as attributes of the root DOM element can simply be set directly, using widget:

// Foo is the component, e.g., Menu, Button, InputText, InputNumber, Select, etc.
$( ".selector" ).ojFoo( "widget" ).css( "height", "100px" );
$( ".selector" ).ojFoo( "widget" ).addClass( "my-class" );

title :string|null

Specify the title of the dialog. null is the default.
Source:
Examples

Initialize the dialog to a specific title title

$(".selector" ).ojDialog( {title: "Title of Dialog" } );

Get or set the title option, after initialization:

// getter
var title = $(".selector" ).ojDialog( "option", "title" );

// setter
$(".selector" ).ojDialog( "option", "title", "Title of Dialog");

translations :Object

A collection of translated resources from the translation bundle, or null if this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.

If this component has (or inherits) translations, their documentation immediately follows this doc entry.

Default Value:
  • an object containing all resources relevant to the component and all its superclasses, or null if none
Inherited From:
Source:
Examples

Initialize the component, overriding some translated resources. This syntax leaves the other translations intact at create time, but not if called after create time:

// Foo is InputDate, InputNumber, etc.
$( ".selector" ).ojFoo({ "translations": { someKey: "someValue",
                                           someOtherKey: "someOtherValue" } });

Get or set the translations option, after initialization:

// Get one.  (Foo is InputDate, InputNumber, etc.)
var value = $( ".selector" ).ojFoo( "option", "translations.someResourceKey" );

// Get all.  (Foo is InputDate, InputNumber, etc.)
var values = $( ".selector" ).ojFoo( "option", "translations" );

// Set one, leaving the others intact.  (Foo is InputDate, InputNumber, etc.)
$( ".selector" ).ojFoo( "option", "translations.someResourceKey", "someValue" );

// Set many.  Any existing resource keys not listed are lost.  (Foo is InputDate, InputNumber, etc.)
$( ".selector" ).ojFoo( "option", "translations", { someKey: "someValue",
                                                    someOtherKey: "someOtherValue" } );

widget

Returns a jQuery object containing the generated wrapper.

This method does not accept any arguments.

Source:
Example

Invoke the widget method:

var widget = $( ".selector" ).ojDialog( "widget" );

Sub-ID's

Each subId locator object contains, at minimum, a subId property, whose value is a string that identifies a particular DOM node in this component. It can have additional properties to further specify the desired node. See getNodeBySubId and getSubIdByNode methods for more details.

Properties:
Name Type Description
subId string Sub-id string to identify a particular dom node.

Following are the valid subIds:

oj-dialog-body

Sub-ID for the dialog body.

Deprecated:
  • This sub-ID is not needed. Since the application supplies this element, it can supply a unique ID by which the element can be accessed.
    Source:
    Example

    Get the node for the dialog body:

    var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-body'} );

    oj-dialog-close

    Sub-ID for the dialog close affordance.

    Source:
    Example

    Get the node for the dialog close affordance:

    var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-close'} );

    oj-dialog-close-icon

    Sub-ID for the dialog close-icon.

    Deprecated:
    • this sub-ID is deprecated, please use oj-dialog-close instead.
      Source:
      Example

      Get the node for the dialog close-icon:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-close-icon'} );

      oj-dialog-content

      Sub-ID for the dialog content.

      Source:
      Example

      Get the node for the dialog content:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-content'} );

      Sub-ID for the dialog footer.

      Source:
      Example

      Get the node for the dialog footer:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-footer'} );

      oj-dialog-header

      Sub-ID for the dialog header.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-header'} );

      oj-dialog-header-close-wrapper

      Sub-ID for the dialog header-close-wrapper.

      Source:
      Example

      Get the node for the dialog header-close-wrapper:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-dialog-header-close-wrapper'} );

      oj-resizable-e

      Sub-ID for the dialog resizable handle at the east location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-e'} );

      oj-resizable-n

      Sub-ID for the dialog resizable handle at the north location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-n'} );

      oj-resizable-ne

      Sub-ID for the dialog resizable handle at the northeast location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-ne'} );

      oj-resizable-nw

      Sub-ID for the dialog resizable handle at the northwest location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-nw'} );

      oj-resizable-s

      Sub-ID for the dialog resizable handle at the south location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-s'} );

      oj-resizable-se

      Sub-ID for the dialog resizable handle at the southeast location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-se'} );

      oj-resizable-sw

      Sub-ID for the dialog resizable handle at the southwest location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-sw'} );

      oj-resizable-w

      Sub-ID for the dialog resizable handle at the west location.

      Source:
      Example

      Get the node for the dialog header:

      var node = $( ".selector" ).ojDialog( "getNodeBySubId", {'subId': 'oj-resizable-w'} );

      Events

      beforeClose

      Triggered when a dialog is about to close. If cancelled, the dialog will not close.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the beforeClose callback specified:

      $( ".selector" ).ojDialog({
          "beforeClose": function( event, ui ) {}
      });

      Bind an event listener to the ojbeforeclose event:

      $( ".selector" ).on( "ojbeforeclose", function( event, ui ) {} );

      beforeOpen

      Triggered when the dialog is about to to open.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the beforeOpen callback specified:

      $( ".selector" ).ojDialog({
          "beforeOpen": function( event, ui ) {}
      });

      Bind an event listener to the ojbeforeopen event:

      $( ".selector" ).on( "ojbeforeopen", function( event, ui ) {} );

      close

      Triggered when the dialog is closed.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the close callback specified:

      $( ".selector" ).ojDialog({
          "close": function( event, ui ) {}
      });

      Bind an event listener to the ojclose event:

      $( ".selector" ).on( "ojclose", function( event, ui ) {} );

      create

      Triggered when the dialog is created.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the create callback specified:

      $( ".selector" ).ojDialog({
          "create": function( event, ui ) {}
      });

      Bind an event listener to the ojcreate event:

      $( ".selector" ).on( "ojcreate", function( event, ui ) {} );

      destroy

      Triggered before the component is destroyed. This event cannot be canceled; the component will always be destroyed regardless.

      Inherited From:
      Source:
      Examples

      Initialize component with the destroy callback

      // Foo is Button, InputText, etc.
      $(".selector").ojFoo({
        'destroy': function (event, data) {}
      });

      Bind an event listener to the destroy event

      $(".selector").on({
        'ojdestroy': function (event, data) {
            window.console.log("The DOM node id for the destroyed component is : %s", event.target.id);
        };
      });

      focus

      Triggered when the dialog gains focus.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the focus callback specified:

      $( ".selector" ).ojDialog({
          "focus": function( event, ui ) {}
      });

      Bind an event listener to the ojfocus event:

      $( ".selector" ).on( "ojfocus", function( event, ui ) {} );

      open

      Triggered when the dialog is opened.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      Source:
      Examples

      Initialize the dialog with the open callback specified:

      $( ".selector" ).ojDialog({
          "open": function( event, ui ) {}
      });

      Bind an event listener to the ojopen event:

      $( ".selector" ).on( "ojopen", function( event, ui ) {} );

      optionChange

      Triggered when any option changes. The event payload has the following properties:

      Properties:
      Name Type Description
      event Event jQuery event object
      data Object event payload
      Properties
      Name Type Description
      option string the name of the option that changed.
      previousValue Object an Object holding the previous value of the option. When previousValue is not a primitive type, i.e., is an Object, it may hold the same value as the value property.
      value Object an Object holding the current value of the option.
      optionMetadata Object information about the option that changed
      Properties
      Name Type Description
      writeback string "shouldWrite" or "shouldNotWrite". For use by the JET writeback mechanism; 'shouldWrite' indicates that the value should be written to the observable.
      Inherited From:
      Source:
      Examples

      Initialize component with the optionChange callback

      // Foo is Button, InputText, etc.
      $(".selector").ojFoo({
        'optionChange': function (event, data) {}
      });

      Bind an event listener to the ojoptionchange event

      $(".selector").on({
        'ojoptionchange': function (event, data) {
            window.console.log("option that changed is: " + data['option']);
        };
      });

      resize

      Triggered when the dialog is being resized.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      • event
        Type: Event
      • ui
        Type: Object
        • originalPosition
          Type: Object
          The CSS position of the dialog prior to being resized.
        • position
          Type: Object
          The current CSS position of the dialog.
        • originalSize
          Type: Object
          The size of the dialog prior to being resized.
        • size
          Type: Object
          The current size of the dialog.
      Source:
      Examples

      Initialize the dialog with the resize callback specified:

      $( ".selector" ).ojDialog({
          "resize": function( event, ui ) {}
      });

      Bind an event listener to the ojresize event:

      $( ".selector" ).on( "ojresize", function( event, ui ) {} );

      resizeStart

      Triggered when the user starts resizing the dialog.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      • event
        Type: Event
      • ui
        Type: Object
        • originalPosition
          Type: Object
          The CSS position of the dialog prior to being resized.
        • position
          Type: Object
          The current CSS position of the dialog.
        • originalSize
          Type: Object
          The size of the dialog prior to being resized.
        • size
          Type: Object
          The current size of the dialog.
      Source:
      Examples

      Initialize the dialog with the resizeStart callback specified:

      $( ".selector" ).ojDialog({
          "resizeStart": function( event, ui ) {}
      });

      Bind an event listener to the ojresizestart event:

      $( ".selector" ).on( "ojresizestart", function( event, ui ) {} );

      resizeStop

      Triggered when the user stops resizing the dialog.
      Properties:
      Name Type Description
      event Event jQuery event object
      ui Object Currently empty
      • event
        Type: Event
      • ui
        Type: Object
        • originalPosition
          Type: Object
          The CSS position of the dialog prior to being resized.
        • position
          Type: Object
          The current CSS position of the dialog.
        • originalSize
          Type: Object
          The size of the dialog prior to being resized.
        • size
          Type: Object
          The current size of the dialog.
      Source:
      Examples

      Initialize the dialog with the resizeStop callback specified:

      $( ".selector" ).ojDialog({
          "resizeStop": function( event, ui ) {}
      });

      Bind an event listener to the ojresizestop event:

      $( ".selector" ).on( "ojresizestop", function( event, ui ) {} );

      Methods

      close() → {void}

      Closes the dialog.
      Properties:
      Name Type Description
      event Event jQuery event object
      Source:
      Fires:
      Returns:
      Type
      void
      Example

      Invoke the close method:

      var close = $( ".selector" ).ojDialog( "close" );

      destroy()

      Remove the dialog functionality completely. This will return the element back to its pre-init state.

      This method does not accept any arguments.

      Source:
      Returns:
      When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.
      Example

      Invoke the destroy method:

      var destroy = $( ".selector" ).ojDialog( "destroy" );

      getNodeBySubId(locator) → {Element|null}

      Returns the component DOM node indicated by the locator parameter.

      If the locator or its subId is null, then this method returns the element on which this component was initialized.

      If a subId was provided but no corresponding node can be located, then this method returns null. For more details on subIds, see the subIds section.

      Parameters:
      Name Type Description
      locator Object An Object containing, at minimum, a subId property, whose value is a string that identifies a particular DOM node in this component.

      If this component has (or inherits) any subIds, then they are documented in the "Sub-ID's" section of this document.

      Subclasses of this component may support additional fields of the locator Object, to further specify the desired node.

      Inherited From:
      Source:
      Returns:
      The DOM node located by the subId string passed in locator, or null if none is found.
      Type
      Element | null
      Example

      Get the node for a certain subId:

      // Foo is ojInputNumber, ojInputDate, etc.
      var node = $( ".selector" ).ojFoo( "getNodeBySubId", {'subId': 'oj-some-sub-id'} );

      isOpen()

      Returns true if the dialog is currently open.

      This method does not accept any arguments.

      Properties:
      Name Type Description
      event Event jQuery event object
      Source:
      Returns:
      When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.
      Example

      Invoke the isOpen method:

      var isOpen = $( ".selector" ).ojDialog( "isOpen" );

      open() → {void}

      Opens the dialog.
      Source:
      Fires:
      Returns:
      Type
      void
      Example

      Invoke the open method:

      var open = $( ".selector" ).ojDialog( "open" );

      option(optionName, value) → {Object|undefined}

      This method has several overloads, which get and set component options and their fields. The functionality is unchanged from that provided by JQUI. See the examples for details on each overload.

      Parameters:
      Name Type Argument Description
      optionName string | Object <optional>
      the option name (string, first two overloads), or the map (Object, last overload). Omitted in the third overload.
      value Object <optional>
      a value to set for the option. Second overload only.
      Inherited From:
      Source:
      Returns:
      The getter overloads return the retrieved value(s). When called via the public jQuery syntax, the setter overloads return the object on which they were called, to facilitate method chaining.
      Type
      Object | undefined
      Examples

      First overload: get one option:

      This overload accepts a (possibly dot-separated) optionName param as a string, and returns the current value of that option.

      var isDisabled = $( ".selector" ).ojFoo( "option", "disabled" ); // Foo is Button, Menu, etc.
      
      // For object-valued options, dot notation can be used to get the value of a field or nested field.
      var startIcon = $( ".selector" ).ojButton( "option", "icons.start" ); // icons is object with "start" field

      Second overload: set one option:

      This overload accepts two params: a (possibly dot-separated) optionName string, and a new value to which that option will be set.

      $( ".selector" ).ojFoo( "option", "disabled", true ); // Foo is Button, Menu, etc.
      
      // For object-valued options, dot notation can be used to set the value
      // of a field or nested field, without altering the rest of the object.
      $( ".selector" ).ojButton( "option", "icons.start", myStartIcon ); // icons is object with "start" field

      Third overload: get all options:

      This overload accepts no params, and returns a map of key/value pairs representing all the component options and their values.

      var options = $( ".selector" ).ojFoo( "option" ); // Foo is Button, Menu, etc.

      Fourth overload: set one or more options:

      This overload accepts a single map of option-value pairs to set on the component. Unlike the first two overloads, dot notation cannot be used.

      $( ".selector" ).ojFoo( "option", { disabled: true, bar: 42 } ); // Foo is Button, Menu, etc.

      refresh() → {void}

      Refresh the dialog. Typically used after dynamic content is added to a dialog.
      Source:
      Returns:
      Type
      void
      Example

      Invoke the refresh method:

      var open = $( ".selector" ).ojDialog( "refresh" );

      Non-public Methods

      Note: Extending JET components is not currently supported. Thus, non-public methods are for internal use only.

      <protected> _activeable(element)

      Sets the oj-active class on mousedown and removes it on mouseup. oj-active is one of JET's 'marker' style classes. It emulates the css :active pseudo-class.

      Unlike _hoverable() and _focusable(), this is an original JET method not inherited from JQUI. (Obviously inspired by those methods.)

      Typically the specified element should be within the component subtree, in which case the class will automatically be removed from the element when the component is destroyed, when its disabled option is set to true, and when _NotifyDetached() is called.

      As a minor exception, for components that wrap themselves in a new root node at create time, if the specified element is within the root node's subtree but not within the init node's subtree, then at destroy time only, the class will not be removed, since destroy() is expected to remove such nodes.

      If the element is NOT in the component subtree, then the caller is responsible for removing the class at the times listed above.

      Parameters:
      Name Type Description
      element jQuery The element to receive the oj-active class when pressed
      Inherited From:
      Source:

      <protected> _AfterCreate()

      This method is called after _ComponentCreate, but before the create event is fired. The JET base component does tasks here that must happen after the component (subclass) has created itself in its override of _ComponentCreate. Notably, the base component handles the rootAttributes and contextMenu options here, since those options operate on the component root node, which for some components is created in their override of _ComponentCreate.

      Subclasses should override this method only if they have tasks that must happen after a superclass's implementation of this method, e.g. tasks that must happen after the context menu is set on the component.

      Overrides of this method should call this._super first.

      Inherited From:
      Source:

      <protected> _AfterCreateEvent()

      This method is called after the create event is fired. Components usually should not override this method, as it is rarely correct to wait until after the create event to perform a create-time task.

      An example of a correct usage of this method is Dialog's auto-open behavior, which needs to happen after the create event.

      Only behaviors (like Dialog auto-open behavior) should occur in this method. Component initialization must occur earlier, before the create event is fired, so that create listeners see a fully inited component.

      Overrides of this method should call this._super first.

      Do not confuse this method with the _AfterCreate method, which is more commonly used.

      Inherited From:
      Source:

      <protected> _CompareOptionValues(option, value1, value2) → {boolean}

      Compares 2 option values for equality and returns true if they are equal; false otherwise.

      Parameters:
      Name Type Description
      option String the name of the option
      value1 Object first value
      value2 Object another value
      Inherited From:
      Source:
      Returns:
      Type
      boolean

      <protected> _ComponentCreate()

      All component create-time initialization lives in this method, except the logic that specifically needs to live in _InitOptions, _AfterCreate, or _AfterCreateEvent, per the documentation for those methods. All DOM creation must happen here, since the intent of _AfterCreate, which is called next, is to contain superclass logic that must run after that DOM is created.

      Overrides of this method should call this._super first.

      Summary of create-time methods that components can override, in the order that they are called:

      1. _InitOptions
      2. _ComponentCreate (this method)
      3. _AfterCreate
      4. (The create event is fired here.)
      5. _AfterCreateEvent

      For all of these methods, the contract is that overrides must call this._super first, so e.g., the _ComponentCreate entry means baseComponent._ComponentCreate, then _ComponentCreate in any intermediate subclasses, then _ComponentCreate in the leaf subclass.

      Inherited From:
      Source:

      <protected> _create()

      This method is final in JET. Components should instead override one or more of the overridable create-time methods listed in _ComponentCreate.

      Inherited From:
      Source:

      <protected> _focusable(element)

      Sets the oj-focus class when the element is focused and removes it when focus is lost.

      Overridden to set the oj-focus class instead of JQUI's hard-coded ui- class, and eliminate JQUI's caching.

      Typically the specified element should be within the component subtree, in which case the class will automatically be removed from the element when the component is destroyed, when its disabled option is set to true, and when _NotifyDetached() is called.

      As a minor exception, for components that wrap themselves in a new root node at create time, if the specified element is within the root node's subtree but not within the init node's subtree, then at destroy time only, the class will not be removed, since destroy() is expected to remove such nodes.

      If the element is NOT in the component subtree, then the caller is responsible for removing the class at the times listed above.

      Parameters:
      Name Type Description
      element jQuery The element to receive the oj-focus class on focus
      Inherited From:
      Source:

      <protected> _getCreateOptions()

      This method is not used in JET. Components should instead override _InitOptions.

      Inherited From:
      Source:

      <protected> _GetReadingDirection() → {string}

      Determines whether the component is LTR or RTL.

      Component responsibilities:

      • All components must determine directionality exclusively by calling this protected superclass method. (So that any future updates to the logic can be made in this one place.)
      • Components that need to know the directionality must call this method at create-time and from refresh(), and cache the value.
      • Components should not call this at other times, and should instead use the cached value. (This avoids constant DOM queries, and avoids any future issues with component reparenting (i.e. popups) if support for directional islands is added.)

      App responsibilities:

      • The app specifies directionality by setting the HTML "dir" attribute on the <html> node. When omitted, the default is "ltr". (Per-component directionality / directional islands are not currently supported due to inadequate CSS support.)
      • As with any DOM change, the app must refresh() the component if the directionality changes dynamically. (This provides a hook for component housekeeping, and allows caching.)
      Default Value:
      • "ltr"
      Inherited From:
      Source:
      Returns:
      the reading direction, either "ltr" or "rtl"
      Type
      string

      <protected> _GetSavedAttributes(element) → {Object|null}

      Gets the saved attributes for the provided element.

      If you don't override _SaveAttributes and _RestoreAttributes, then this will return null.

      If you override _SaveAttributes to call _SaveAllAttributes, then this will return all the attributes. If you override _SaveAttributes/_RestoreAttributes to do your own thing, then you may also have to override _GetSavedAttributes to return whatever you saved if you need access to the saved attributes.

      Parameters:
      Name Type Description
      element Object jQuery selection, should be a single entry
      Inherited From:
      Source:
      Returns:
      savedAttributes - attributes that were saved for this element in _SaveAttributes, or null if none were saved.
      Type
      Object | null

      <protected> _hoverable(element)

      Sets the oj-hover class when the element is hovered and removes it when the hover ends.

      Overridden to set the oj-hover class instead of JQUI's hard-coded ui- class, and eliminate JQUI's caching.

      Typically the specified element should be within the component subtree, in which case the class will automatically be removed from the element when the component is destroyed, when its disabled option is set to true, and when _NotifyDetached() is called.

      As a minor exception, for components that wrap themselves in a new root node at create time, if the specified element is within the root node's subtree but not within the init node's subtree, then at destroy time only, the class will not be removed, since destroy() is expected to remove such nodes.

      If the element is NOT in the component subtree, then the caller is responsible for removing the class at the times listed above.

      Parameters:
      Name Type Description
      element jQuery The element to receive the oj-hover class on hover
      Inherited From:
      Source:

      <protected> _init()

      JET components should almost never implement this JQUI method. Please consult an architect if you believe you have an exception. Reasons:

      • This method is called at create time, after the create event is fired. It is rare for that to be the appropriate time to perform a create-time task. For those rare cases, we have the _AfterCreateEvent method, which is preferred over this method since it is called only at that time, not also at re-init time (see next).
      • This method is also called at "re-init" time, i.e. when the initializer is called after the component has already been created. JET has not yet identified any desired semantics for re-initing a component.
      Inherited From:
      Source:

      <protected> _InitOptions(originalDefaults, constructorOptions)

      This method is called before _ComponentCreate, at which point the component has not yet been rendered. Component options should be initialized in this method, so that their final values are in place when _ComponentCreate is called.

      This includes getting option values from the DOM, where applicable, and coercing option values (however derived) to their appropriate data type if needed.

      No work other than setting options should be done in this method. In particular, nothing should be set on the DOM until _ComponentCreate, e.g. setting the disabled DOM attribute from the disabled option.

      A given option (like disabled) appears in the constructorOptions param iff the app set it in the constructor:

      • If it appears in constructorOptions, it should win over what's in the DOM (e.g. disabled DOM attribute). If for some reason you need to tweak the value that the app set, then enable writeback when doing so: this.option('foo', bar, {'_context': {writeback: true, internalSet: true}}).
      • If it doesn't appear in constructorOptions, then that option definitely is not bound, so writeback is not needed. So if you need to set the option (e.g. from a DOM attribute), use this.option('foo', bar, {'_context': {internalSet: true}}).

      Overrides of this method should call this._super first.

      Parameters:
      Name Type Argument Description
      originalDefaults Object original default options defined on the component and its ancestors
      constructorOptions Object <nullable>
      options passed into the widget constructor
      Inherited From:
      Source:

      <protected> _IsEffectivelyDisabled() → {boolean}

      Determines whether this component is effectively disabled, i.e. it has its 'disabled' attribute set to true or it has been disabled by its ancestor component.

      Inherited From:
      Source:
      Returns:
      true if the component has been effectively disabled, false otherwise
      Type
      boolean

      <protected> _NotifyAttached()

      Notifies the component that its subtree has been connected to the document programmatically after the component has been created.

      Inherited From:
      Source:

      <protected> _NotifyContextMenuGesture(menu, event, eventType)

      When the contextMenu option is set, this method is called when the user invokes the context menu via the default gestures: right-click, Press & Hold, and Shift-F10. Components should not call this method directly.

      The default implementation simply calls this._OpenContextMenu(event, eventType). Overrides of this method should call that same method, perhaps with additional params, not menu.open().

      This method may be overridden by components needing to do things like the following:

      • Customize the launcher or position passed to _OpenContextMenu(). See that method for guidance on these customizations.
      • Customize the menu contents. E.g. some components need to enable/disable built-in commands like Cut and Paste, based on state at launch time.
      • Bail out in some cases. E.g. components with UX approval to use PressHoldRelease rather than Press & Hold can override this method to say if (eventType !== "touch") this._OpenContextMenu(event, eventType);. When those components detect the alternate context menu gesture (e.g. PressHoldRelease), that separate listener should call this._OpenContextMenu(), not this method (_NotifyContextMenuGesture()), and not menu.open().

      Components needing to do per-launch setup like the above tasks should do so in an override of this method, not in a beforeOpen listener or an _OpenContextMenu() override. This is discussed more fully here.

      Parameters:
      Name Type Description
      menu Object The JET Menu to open as a context menu. Always non-null.
      event Event What triggered the menu launch. Always non-null.
      eventType string "mouse", "touch", or "keyboard". Never null.
      Inherited From:
      Source:

      <protected> _NotifyDetached()

      Notifies the component that its subtree has been removed from the document programmatically after the component has been created.

      Inherited From:
      Source:

      <protected> _NotifyHidden()

      Notifies the component that its subtree has been made hidden programmatically after the component has been created.

      Inherited From:
      Source:

      <protected> _NotifyShown()

      Notifies the component that its subtree has been made visible programmatically after the component has been created.

      Inherited From:
      Source:

      <protected> _OpenContextMenu(event, eventType, openOptions, submenuOpenOptions, shallow)

      The only correct way for a component to open its context menu is by calling this method, not by calling Menu.open() or _NotifyContextMenuGesture(). This method should be called in two cases:

      • This method is called by _NotifyContextMenuGesture() and its overrides. That method is called when the baseComponent detects the default context menu gestures: right-click, Press & Hold, and Shift-F10.
      • Components with UX-approved support for alternate context menu gestures like PressHoldRelease should call this method directly when those gestures are detected.

      Components needing to customize how the context menu is launched, or do any per-launch setup, should do so in the caller of this method, (which is one of the two callers listed above), often by customizing the params passed to this method (_OpenContextMenu) per the guidance below. This setup should not be done in the following ways:

      • Components should not perform setup in a beforeOpen listener, as this can cause a race condition where behavior depends on who got their listener registered first: the component or the app. The only correct component use of a beforeOpen listener is when there's a need to detect whether something else launched the menu.
      • Components should not override this method (_OpenContextMenu), as this method is final. Instead, customize the params that are passed to it.

      Guidance on setting OpenOptions fields:

      Launcher:

      Depending on individual component needs, any focusable element within the component can be the appropriate launcher for this launch.

      Browser focus returns to the launcher on menu dismissal, so the launcher must at least be focusable. Typically a tabbable (not just focusable) element is safer, since it just focuses something the user could have focused on their own.

      By default (i.e. if openOptions is not passed, or if it lacks a launcher field), the component init node is used as the launcher for this launch. If that is not focusable or is suboptimal for a given component, that component should pass something else. E.g. components with a "roving tabstop" (like Toolbar) should typically choose the current tabstop as their launcher.

      The :focusable and :tabbable selectors may come in handy for choosing a launcher, e.g. something like this.widget().find(".my-class:tabbable").first().

      Position:

      By default, this method applies positioning that differs from Menu's default in the following ways: (The specific settings are subject to change.)

      • For mouse and touch events, the menu is positioned relative to the event, not the launcher.
      • For touch events, "my" is set to "start>40 center", to avoid having the context menu obscured by the user's finger.

      Usually, if position needs to be customized at all, the only thing that needs changing is its "of" field, and only for keyboard launches (since mouse/touch launches should almost certainly keep the default "event" positioning). This situation arises anytime the element relative to which the menu should be positioned for keyboard launches is different than the launcher element (the element to which focus should be returned upon dismissal). For this case, { "position": {"of": eventType==="keyboard" ? someElement : "event"} } can be passed as the openOptions param.

      Be careful not to clobber useful defaults by specifying too much. E.g. if you only want to customize "of", don't pass other fields like "my", since your value will be used for all modalities (mouse, touch, keyboard), replacing the modality-specific defaults that are usually correct. Likewise, don't forget the eventType==="keyboard" check if you only want to customize "of" for keyboard launches.

      InitialFocus:

      This method forces initialFocus to "menu" for this launch, so the caller needn't specify it.

      Parameters:
      Name Type Argument Description
      event Event What triggered the context menu launch. Must be non-null.
      eventType string "mouse", "touch", or "keyboard". Must be non-null. Passed explicitly since caller knows what it's listening for, and since events like contextmenu and click can be generated by various input modalities, making it potentially error-prone for this method to determine how they were generated.
      openOptions Object <optional>
      Options to merge with this method's defaults, which are discussed above. The result will be passed to Menu.open(). May be null or omitted. See also the shallow param.
      submenuOpenOptions Object <optional>
      Options to be passed through to Menu.open(). May be null or omitted.
      shallow boolean <optional>
      Whether to perform a deep or shallow merge of openOptions with this method's default value. The default and most commonly correct / useful value is false.
      • If true, a shallow merge is performed, meaning that the caller's position object, if passed, will completely replace this method's default position object.
      • If false or omitted, a deep merge is performed. For example, if the caller wishes to tweak position.of while keeping this method's defaults for position.my, position.at, etc., it can pass {"of": anOfValue} as the position value.

      The shallow param is n/a for submenuOpenOptions, since this method doesn't apply any defaults to that. (It's a direct pass-through.)

      Inherited From:
      Source:

      <protected> _RestoreAllAttributes()

      Restores all the element's attributes which were saved in _SaveAllAttributes. This method is final in JET.

      If a subclass wants to save/restore all attributes on create/destroy, then the subclass can override _SaveAttributes and call _SaveAllAttributes and also override _RestoreAttributes and call _RestoreAllAttributes.

      Inherited From:
      Source:

      <protected> _RestoreAttributes()

      Restore the attributes saved in _SaveAttributes.

      _SaveAttributes is called during _create. And _RestoreAttributes is called during _destroy.

      This base class default implementation does nothing.

      We also have _SaveAllAttributes and _RestoreAllAttributes methods that save and restore all the attributes on an element. Component subclasses can opt into these _SaveAllAttributes/_RestoreAllAttributes implementations by overriding _SaveAttributes and _RestoreAttributes to call _SaveAllAttributes/_RestoreAllAttributes. If the subclass wants a different implementation (like save only the 'class' attribute), it can provide the implementation itself in _SaveAttributes/_GetSavedAttributes/_RestoreAttributes.

      Inherited From:
      Source:

      <protected> _SaveAllAttributes(element)

      Saves all the element's attributes within an internal variable. _RestoreAllAttributes will restore the attributes from this internal variable.

      This method is final in JET. Subclasses can override _RestoreAttributes and call _RestoreAllAttributes.

      The JSON variable will be held as:

      [
        {
        "element" : element[i],
        "attributes" :
          {
            attributes[m]["name"] : {"attr": attributes[m]["value"], "prop": $(element[i]).prop(attributes[m]["name"])
          }
        }
      ]
      
      Parameters:
      Name Type Description
      element Object jQuery selection to save attributes for
      Inherited From:
      Source:

      <protected> _SaveAttributes(element)

      Saves the element's attributes. This is called during _create. _RestoreAttributes will restore all these attributes and is called during _destroy.

      This base class default implementation does nothing.

      We also have _SaveAllAttributes and _RestoreAllAttributes methods that save and restore all the attributes on an element. Component subclasses can opt into these _SaveAllAttributes/_RestoreAllAttributes implementations by overriding _SaveAttributes and _RestoreAttributes to call _SaveAllAttributes/_RestoreAllAttributes. If the subclass wants a different implementation (like save only the 'class' attribute), it can provide the implementation itself in _SaveAttributes/_RestoreAttributes.

      Parameters:
      Name Type Description
      element Object jQuery selection to save attributes for
      Inherited From:
      Source:

      <protected> _SetRootAttributes()

      Reads the rootAttributes option, and sets the root attributes on the component's root DOM element. See rootAttributes for the set of supported attributes and how they are handled.

      Inherited From:
      Source:
      Throws:
      if unsupported attributes are supplied.

      <protected> _UnregisterChildNode()

      Remove all listener references that were attached to the element.
      Inherited From:
      Source: