Class: ojInputDate

Oracle® Fusion Middleware Oracle JavaScript Extension Toolkit (JET)
12c (12.1.4)

E54107-01

QuickNav

oj. ojInputDate extends oj.inputBase

JET ojInputDate Component

Description: ojInputDate provides basic support for datepicker selection.

Keyboard interaction

When focus is NOT on the grid and on the input element.

Key Use
DownArrow or UpArrow Shows the grid and moves the focus into the expanded date grid
Esc Close the grid.

When focus is on the grid.

Key Use
Enter Select the currently focused day
UpArrow Move up in the grid.
DownArrow Move down in the grid.
RightArrow Move right in the grid.
LeftArrow Move left in the grid.
Esc Close the grid.
Home Move focus to first day of the month.
End Move focus to last day of the month.
PageUp Switch to previous month.
PageDown Switch to next month.
Alt + PageUp Switch to previous year.
Alt + PageDown Switch to next year.
Ctrl + Alt + PageUp Switch to previous by stepBigMonths.
Ctrl + Alt + PageDown Switch to next by stepBigMonths.
Ctrl + Alt + T Places focus on Today button if it exists.
Ctrl + Alt + D Places focus on Done button if it exists.

Pseudo-selectors

$( ":oj-inputDate" )            // selects all JET input on the page

Declarative Binding


   <input id="dateId" data-bind="ojComponent: {component: 'ojInputDate'}" />

Initializer

.ojInputDate(options)

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

Initialize the input element with no options specified:

$( ".selector" ).ojInputDate();

* @example Initialize the input element with some options:
$( ".selector" ).ojInputDate( { "disabled": true } );

Initialize the input element via the JET ojComponent binding:

<input id="dateId" data-bind="ojComponent: {component: 'ojInputDate'}" />

Options

#buttonPanel :string

Will dictate button pane behavior underneath the calendar.
Supported Values:
Name Type Description
"none" string Do not show anything
"default" string The button pane contains two buttons, a Today button that links to the current day, and a Done button that closes the datepicker.
Default Value:
  • "none"
Source:

#changeMonth :string

Whether the month should be rendered as a dropdown instead of text.
Supported Values:
Name Type Description
"select" string As a dropdown.
"none" string As a text.
Default Value:
  • "select"
Source:

#changeYear :string

Whether the year should be rendered as a dropdown instead of text.
Supported Values:
Name Type Description
"select" string As a dropdown.
"none" string As a text.
Default Value:
  • "select"
Source:

#contextMenu :Object

JQ selector identifying the JET Menu that the component should launch as a context menu on right-click or Shift-F10. 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.

The JET Menu should be initialized before any component using it as a context menu.

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) :
$( ".selector" ).ojFoo({ "contextMenu": "#myMenu" });

Get or set the contextMenu option, after initialization:

// getter
var menu = $( ".selector" ).ojFoo( "option", "contextMenu" );

// setter
$( ".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

#converter

Default converter for ojInputDate If one wishes to provide a custom converter for the ojInputDate override the factory returned for oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME)
Default Value:
  • oj.Validation.converterFactory(oj.ConverterFactory.CONVERTER_TYPE_DATETIME).createConverter()
Source:

#currentMonthPos

The position in multipe months at which to show the current month (starting at 0)
Default Value:
  • 0
Source:

#dayMetaData

Additional info to be used when rendering the day This should be in the following JSON format with the year, month, day based on Date.getFullYear(), Date.getMonth(), and Date.getDate(): {year: {month: {day: {disabled: true|false, className: "additionalCSS", tooltip: 'Stuff to display'}}} There also exists a special '*' character which represents ALL within that field [i.e. * within year, represents for ALL year].
Default Value:
  • null
Source:
Example
 {2013: {11: {25: {disabled: true, className: 'holiday', tooltip: 'Stuff to display'}, 5: {disabled: true}}}}}

#daysOutsideMonth :string

Will dictate the behavior of days outside the current viewing month.
Supported Values:
Name Type Description
"hidden" string Days outside the current viewing month will be hidden
"visible" string Days outside the current viewing month will be visible
"selectable" string Days outside the current viewing month will be visible + selectable
Default Value:
  • "hidden"
Source:

#disabled :boolean|undefined

whether the component is disabled.

The 2-way disabled binding offered by the ojComponent binding should be used instead of Knockout's built-in disable and enable bindings, as the former sets the API, while the latter sets the underlying DOM attribute.

Default Value:
  • false. The element's disabled property is used as its initial value if it exists, when the option is not explicitly set. When neither is set, disabled defaults to false.
Inherited From:
Source:
Example

Initialize component with disabled option:

$(".selector").ojInputText({"disabled": true});

#help :Object.<string, string>

The help information that goes on the label. When help is set on the input component, then help information is added to the input's label. The help options are:
  • definition - this is the help definition text. It is what shows up when the user hovers over the label or the help icon.
  • source - this is the help source url. If present, a help icon will render next to the label and the anchor's target is this source.
Default Value:
  • { "definition":"some help definition, "source":"some external url" }
Inherited From:
Source:
Examples

Initialize the input with the help definition and external url information:

$( ".selector" ).ojRadioset({ "help": {"definition":"some help definition, "source":"some external url" } });

Set the help option, after initialization:

// setter
$( ".selector" ).ojRadioset( "option", "help", {"definition":"fill out the name", "source":"http:\\www.oracle.com" } );

#max

The maximum selectable date. When set to null, there is no maximum.
  • type string - should be in a format conforming to the converter
  • type Date - JavaScript Date object
  • null - no limit
Default Value:
  • null
Source:

#messages :Array|undefined

an array of messages for this component, each instance of type oj.Message or an object that duck types it.
Default Value:
  • initializes to an empty array when no option is set.
Inherited From:
Source:
Examples

Get the current set of messages for the component:

var messages = $(".selector").ojInputText("option", "messages");

Clear all messages set on the component:

$(".selector").ojInputText("option", "messages", []);

Add a message (of default error severity) to the component using the messages option:

var msgs = [];
msgs.push({'summary': 'Error Summary', 'detail': 'Error Detail'}); 
$(".selector").ojInputText("option", "messages", msgs);

Set a oj.Message instance to the component:

var message = new oj.Message("summary text", "detail text");
var messagesArr = [message];
$(".selector").ojInputText("option", "messages", messagesArr);

#messagingDisplayOptions :Object|undefined

an Object literal containing the following property-value pairs, that allows a widget to specify how it wants various 'messaging artifacts' to be displayed in relation to itself.
Accepted values for the key is a string type of the messaging artifact and they include 'messages', 'converterHint', 'validatorHint', 'title'.
The value is either an array of display options or a string display option. When an array of display options is specified the first display option is used first and then the second as fallback and so on. NOTE: In the future we plan to support additional display options like 'inline'.
Properties:
Name Type Argument Description
converterHint string <optional>
supported values are 'placeholder', 'notewindow', 'none'. E.g. {'converterHint': ['placeholder', 'notewindow']}
validatorHint string <optional>
supported values are 'notewindow', 'none'. E.g. {'validatorHint': ['notewindow']}
messages string <optional>
supported values are 'notewindow', 'none'. E.g. {'messages': 'notewindow'}
title string <optional>
supported values are 'notewindow', 'none'. E.g. {'title': 'notewindow'}
Default Value:
  • { 'messages': ['notewindow'], 'converterHint': ['placeholder', 'notewindow'], 'validatorHint': ['notewindow'], 'title': ['notewindow'] }
Inherited From:
Source:
Example

Initialize component and override default for converterHint using messagingDisplayOptions:

// Only messages will get shown in the notewindow associated to this component
$(".selector").ojInputText("option", "messagingDisplayOptions", {
  'converterHint': ['notewindow'] // the default is ['placeholder', 'notewindow']
});

#min

The minimum selectable date. When set to null, there is no minimum.
  • type string - should be in a format conforming to the converter
  • type Date - JavaScript Date object
  • null - no limit
Default Value:
  • null
Source:

#numberOfMonths

The number of months to show at once.
Default Value:
  • 1
Source:

#pattern :string|undefined

Regular expression pattern which will be used to validate the component's value. Note that option value always supercedes element's attribute value and it is best practice to pass the value as an option than to set it as an element's attribute.
Inherited From:
Source:
Examples

Initialize the component with the pattern option:

$(".selector").ojInputText({pattern: "[a-zA-Z0-9]{3-9}"});

Initialize pattern option from the html attribute 'pattern':

<input type="text" id="username" value= "" pattern="[a-zA-Z0-9]{3,}" 
          title="Enter at least 3 alphanumeric characters"/>
// reading the pattern option will return "[a-zA-Z0-9]{3-9}" $(".selector").ojInputText("option", "pattern");

#placeholder :string|undefined

This option allows setting HTML5's placeholder attribute. Though it is possible to set placeholder attribute on the element itself, the component will only read the value during creation time; meaning any subsequent changes to the element's placeholder attribute will not be picked up.
Inherited From:
Source:
Examples

Initialize the component with the placeholder option:

<input id="userId" data-bind="ojComponent: {component: 'ojInputText', placeholder: 'User Name'}" />

Initialize placeholder option from html attribute:

<input id="userId" data-bind="ojComponent: {component: 'ojInputText'}" placeholder="User Name" />

// reading the placeholder option will return "User Name"
$(".selector").ojInputText("option", "placeholder");

#readOnly :boolean|undefined

Dictates component's readOnly state. Note that option value always supercedes element's attribute value and it is best practice to pass the value as an option than to set it as an element's attribute.
Default Value:
  • false
Inherited From:
Source:
Example

Initialize component with readOnly option:

$(".selector").ojInputNumber({"readOnly": true});

#required :string|undefined

whether the component is required. Allowed values for required are 'required' and 'optional', 'optional' being the default.
When required option is set, the input's label will render a required icon.
When required option is set, a required validator - (@link oj.RequiredValidator) - is implicitly used. If an explicit required validator is set using the validators option then that gets used instead.
Default Value:
  • when the option is not set, the element's required property is used as its initial value if it exists.
Inherited From:
Source:
Examples

Initialize the component with the required option:

$(".selector").ojInputNumber({required: 'required'});

Initialize required otpion from html attribute 'required':

<input type="text" value= "foobar" required/>
// reading the required option will return "required" $(".selector").ojInputNumber("option", "required");

Using required option and setting an explicit required validator:

<input type="text" value="foobar" required data-bind="ojComponent: {
  component: 'ojInputText', 
  value: password, 
  validators: [{type: 'required', options : {
                               messageSummary: '\'{label}\' Required', 
                               messageDetail: 'A value is required for this field'}}]}"/>

#rootAttributes :Object|undefined

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 root element at creation time.

The specified class and style are appended to the current class and style, respectively. All other attributes overwrite any existing value.

Setting this option after component creation has no effect.

Default Value:
  • undefined
Inherited From:
Source:
Example

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

$( ".selector" ).ojFoo({ "rootAttributes": {
  'id': 'myId', 
  'style': 'max-width:100%; color:blue;', 
  'class': 'my-class'
}});

#showOn :string

When the datepicker should be shown.
Supported Values:
Name Type Description
"focus" string when the element receives focus or when the trigger calendar image is clicked
"image" string when the trigger calendar image is clicked
Default Value:
  • "image"
Source:

#stepBigMonths

Number of months to step back/forward for the (Alt + Page up) + (Alt + Page down) key strokes
Default Value:
  • 12
Source:

#stepMonths

How the prev + next will step back/forward the months
  • type number - Number of months to step back/forward
  • type string - Will use numberOfMonths as value
Default Value:
  • "block"
Source:

#title :string|undefined

represents advisory information for the component, such as would be appropriate for a tooltip.
Default Value:
  • when the option is not set, the element's title attribute is used as its initial value if it exists.
Inherited From:
Source:
Examples

Initialize the component with the title option:

<input id="username" type="text" data-bind="
   ojComponent: {component: 'ojInputText', title : 'enter at least 3 alphanumeric characters', 
                 pattern: '[a-zA-Z0-9]{3,}', value: ''}"/>

Initialize title option from html attribute 'title':

<input id="username" type="text" value= "foobar" title="enter at least 3 alphanumeric characters" 
          pattern="[a-zA-Z0-9]{3,}"/>
$("#username").ojInputText({}); // reading the title option will return "enter at least 3 alphanumeric characters" $("#username").ojInputText("option", "title");

#validators :Array|undefined

an array of validator instances, where each instance duck types oj.Validator, or an array of validator object literals where each object contains the following name value pairs.
  • type: a string validator type that is registered with the oj.ValidatorFactory. An instance is created using the factory method on @link oj.ValidatorFactory.
  • options: an optional Object literal of options that the validator expects.
After the component has been initialized with validators, changing the validators on the component can present issues that need to addressed appropriately
- if the component is valid, the current value that passed validations before may now start failing. E.g, if value was below a certain max value but a new validator lowered the max value, invalidating the current value. In such cases the page author has the option of calling the validate() method to re-run validators against the current value. In some cases it may be necessary to re-initialize the component.
- if the component was invalid when the validators changed, again it may be necessary to for the page author to clear messages on the component, or in some cases re-initialize the component might be necessary.
Inherited From:
Source:
Examples

Initialize the component with validator object literal:

$(".selector").ojInputNumber({
  validators: [{
    type: 'numberRange', 
    options : {
      hint: {hintMinimum: 'Enter a value greater than '{min}'}, 
      min: 100
    }
  }],
});
NOTE: oj.Validation.validatorFactory('numberRange') returns the validator factory that is used 
to instantiate a numberRange validator.

Initialize the component with multiple validator instances:

var validator1 = new MyCustomValidator({'foo': 'A'}); 
var validator2 = new MyCustomValidator({'foo': 'B'});
$(".selector").ojInputNumber({
  value: 10, 
  validators: [validator1, validator2]
});

#value :Object|undefined

The value of the editable component.
Default Value:
  • When the option is not set, the element's value property is used as its initial value if it exists. The type of value is as defined by the component that extends this class. Refer to specific components for defaults.
Inherited From:
Source:
Examples

Initialize the component with the value option specified:

$(".selector").ojInputNumber({'value': 10});

Get or set the value option, after initialization:

// Getter: returns 10
$(".selector").ojInputNumber("option", "value");
// Setter: sets 20
$(".selector").ojInputNumber("option", "value", 20);

#weekDisplay :string

Whether week of the year will be shown.
Supported Values:
Name Type Description
"number" string Will show the week of the year as a number
"none" string Nothing will be shown
Default Value:
  • none
Source:

Events

#optionChange

Triggered when the following component options change.
  • messages: a component's validity changes when its messages changes. For example -
    • when it goes from valid with no messages, to invalid with messages (of severity fatal or error), or to valid with messages (of severity warning, info or confirmation).
    • when it goes from valid with messages, to valid with a new set of messages, or to valid with no messages, or to invalid with messages
    • when it goes from invalid with messages, to invalid with new set of messages, or to valid with no messages, or to valid with messages (of severity warning or lower).
  • value: when the component's value 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, i.e. "messages" or "value"
previousValue Object an Object holding the previous value of the option
value Object an Object holding the current value of the option
optionMetadata Object an Object literal that provides metadata for the option.
Inherited From:
Source:
Examples

Initialize the ojInputText component with the optionChange callback to be notified of changes to the component's validity

$(".selector").ojInputText({
  'optionChange': function (event, data) {} 
});

Bind an event listener to the ojoptionchange event

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

Methods

#calendarDisplay()

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

#getNodeBySubId(locator) → {Object|null}

Return the subcomponent node represented by the documented locator attribute values.
Locator Description
oj-datepicker-content Datepicker content div container
oj-inputdatetime-calendar-icon Calendar icon that triggers the Datepicker content display
oj-datepicker-prev-icon Previous month icon
oj-datepicker-next-icon Next month icon
oj-datepicker-month Month span or select element
oj-datepicker-year Year span or select element
oj-datepicker-current Current/Today button for button bar
oj-datepicker-close Done/Close button for button bar
Parameters:
Name Type Description
locator Object An Object containing at minimum a subId property whose value is a string, documented by the component, that allows the component to look up the subcomponent associated with that string. It contains:

component: optional - in the future there may be more than one component contained within a page element

subId: the string, documented by the component, that the component expects in getNodeBySubId to locate a particular subcomponent

Source:
Returns:
the subcomponent located by the subId string passed in locator, if found.

Type
Object | null

#getSubIdByNode(node) → {string|null}

Return the subId string for the given child DOM node
Parameters:
Name Type Description
node Element child DOM node
Inherited From:
Source:
Returns:
- the subId for the DOM node or null when none is found
Type
string | null

#hide()

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

#isValid() → {boolean}

whether the component is currently valid.
Inherited From:
Source:
Returns:
Type
boolean
Example

Check whether the component is valid:

var value = $(".selector").ojInputText("isValid");

option(key, value)

Reacts to changes to the 'value' or 'messages' option by triggering a 'optionChange' event if the value changes from its previous value. Refer to the optionChange event for details.
Parameters:
Name Type Argument Description
key String | Object | string <optional>
a single string representing a key or an object representing a group of options
value Object <optional>
of the key
Inherited From:
Source:
Fires:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

#refresh()

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

#show()

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

#validate(requiredOnly)

A convenience method to validate the option value after it is set programmatically using the option setter.
When the value property is set, it's expected to be of the correct type as defined by the component. To run the value through the validators, this method can be called. When there are no validators setup for the component this method is a no-op and returns true. When there is at least one validator the first one that fails, updates the component validity, adds messages and triggers the optionChange event.
Callers should explicitly clear messages when calling this method.
Parameters:
Name Type Description
requiredOnly boolean If true only runs the required-ness check.
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.
Example

Validate the value option.

// set value
$(.selector).ojInputDate('option', 'value', new Date());
// clear current messages on component
$(.selector).ojInputText('option', 'messages', []);
// validate value. validation errors are displayed if any based on the messagingDisplayOptions.
$(.selector).ojInputText('validate');

Non-public Methods

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

<protected> #_AfterCreate()

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

<protected> #_CanSetValue()

Whether the a value can be set on the component. If the component is disabled then setting value on component is a no-op.
Inherited From:
Source:
See:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_ComponentCreate()

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

<protected> #_destroy()

Detaches the widget from the element and restores element exactly like it was before the widget was attached.
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_GetAllValidators() → {Array}

Returns an array of all validators built by merging the validators option set on the component and the default validators setup by the component.
This does not include the default required validator. Components can override to add to this array of validators.
Inherited From:
Source:
Returns:
of validators
Type
Array

<protected> #_GetContentElement() → {Object}

Returns a jquery object of the element representing the content node. This could be a jQuery object of the element the widget was invoked on - typically this is an input or select or textarea element for which a value can be set.
Inherited From:
Source:
Returns:
the jquery element that represents the editable content. E.g., an input
Type
Object

<protected> #_GetConverter() → {Object}

Returns the normalized converter instance.
Inherited From:
Source:
Returns:
a converter instance or null
Type
Object

<protected> #_GetDefaultStyleClass() → {string}

Returns the default styleclass for the component. Currently this is used to pass to the _ojLabel component, which will append -label and add the style class onto the label. This way we can style the label specific to the input component. For example, for inline labels, the radioset/checkboxset components need to have margin-top:0, whereas all the other inputs need it to be .5em. So we'll have a special margin-top style for .oj-label-inline.oj-radioset-label All input components must override
Inherited From:
Source:
Returns:
Type
string

<protected> #_GetDisplayValue(value) → {string}

Returns the display value that is ready to be passed to the converter.
Parameters:
Name Type Description
value Object the stored value if available that needs to be formatted for display
Inherited From:
Source:
Returns:
usually a string display value
Type
string

<protected> #_GetLabelElement() → {Object}

Returns a jquery object of the element representing the primary label node for the input component. First we look for the aria-labelledby attribute on the input. If that's not found, we look for the label with 'for' attribute pointing to input. If that's not found, we walk up the dom looking for aria-labelledby.
Inherited From:
Source:
Returns:
the jquery element that represents the input component's label. return null if it can't find anything.
Type
Object

<protected> #_GetMessagingLauncherElement() → {Object}

Returns a jquery object of the element that triggers messaging behavior. The trigger element is usually an input or select or textarea element for which a value can be set/retrieved and validated.
Inherited From:
Source:
Returns:
jquery object
Type
Object

<protected> #_GetMessagingLauncherElement() → {Object}

Returns a jquery object of the element that triggers messaging behavior. The trigger element is usually an input or select or textarea element for which a value can be set/retrieved and validated.
Inherited From:
Source:
Returns:
jquery object
Type
Object

<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 from _create() and 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 if directional islands and component reparenting (e.g. popups) should coexist.)

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}

Gets the saved attributes for the provided element. This is usually the original list of attributes set on the element.
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.
Type
Object

<protected> #_HandleChangeEvent(event)

Convenience handler for the DOM 'change' event. Subclasses are expected to wire up event handlers for DOM events that they wish to handle.
The implementation retrieves the display value for the component by calling _GetDisplayValue() and calls _SetValue(), with full validation.
Parameters:
Name Type Description
event Event DOM event
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_IsRequired() → {boolean}

Whether the component is required.
Inherited From:
Source:
Returns:
true if required; false
Type
boolean

<protected> #_Refresh(name, value, fullRefresh)

Called in response to a change in the options set for this component, this method refreshes the component display value. Subclasses can override to provide custom refresh behavior.
Parameters:
Name Type Argument Description
name String <optional>
the name of the option that was changed
value Object <optional>
the current value of the option
fullRefresh boolean <optional>
false is the default; true means always refresh component display value
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_RefreshAriaRequired(value)

Called when a aria-required attribute needs to be set or removed. Most inputs/selects need aria-required on the input element (aka 'content') But it is not legal to have aria-required on radio/checkboxes. Subclasses can override to put aria-required where they want.
Parameters:
Name Type Argument Description
value Object <optional>
the current value of the required option
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_RefreshLabelDependents()

Called when the label DOM changes. This method resets any validators that rely on the label.
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_ResetAllValidators()

EditableValue caches the validators to be run within this.__allValidators variable. This is great; however when the default validators need to be reset [i.e. min + max changing] then the cached this.__allValidators needs to be cleared out. This method also updates the messaging strategies as hints associated with validators could have changed.
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_RestoreAttributes()

Restores the saved element's attributes
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_SaveAttributes(element)

The base method needs to be overriden so that one can perform attribute check/set [i.e. ojInputText can only have type="text"]
Parameters:
Name Type Description
element Object jQuery selection to save attributes for
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_setOption(name, value)

Called (by the widget factory) when the option changes, this method responds to the change by refreshing the component if needed. This method is not called for the options passed in during the creation of the widget.
Parameters:
Name Type Description
name string of the option
value Object | string
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_SetPlaceholder(value)

Sets the placeholder text on the content element by default. It sets the placeholder attribute on the element. Component subclasses can override this method to control where placeholder text gets set.
Parameters:
Name Type Description
value string
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_SetRootAttributes()

Reads the rootAttributes option, and sets the root attributes on the component's root DOM element.

class and style are appended to the current class and style, respectively. All other attributes overwrite any existing value.

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

<protected> #_TriggerOptionChange(option, previousValue, originalEvent)

Triggers a 'optionChange' event on the component. The payload is the previous and current values for the option that changed. Currently supported options that trigger this event are value and messages.
Parameters:
Name Type Argument Description
option string name of the option that changed
previousValue string | number | Object an array of the previous
originalEvent Event <optional>
the original dom event that triggered the validation. If this is set then writeback happens.
Inherited From:
Source:
Returns:
When called via the public jQuery syntax, this method returns the object on which it was called, to facilitate method chaining.

<protected> #_ValueEquals(value1, value2) → {boolean}

Compares 2 values for equality and returns true if they are equal; false otherwise. Calls oj.Object.innerEquals() which works for most Javascript data types.
Parameters:
Name Type Description
value1 Object | string | undefined first value
value2 Object | string | undefined another value
Inherited From:
Source:
Returns:
Type
boolean