眼睛小的匕首 · 金洪名筑-甲子塘金洪名筑-深圳房地产信息网· 3 月前 · |
神勇威武的长颈鹿 · 使用 timetable ...· 8 月前 · |
不开心的盒饭 · [附带番外]当娇气包穿进恐怖直播[无限](柠 ...· 11 月前 · |
俊秀的松球 · 黑苹果优化之制作Mac OS ...· 1 年前 · |
Description:
A JET InputDateTime extends from InputDate providing additionally time selection drop down. The time format is based on the converter and default converter uses the locale to determine the
time format. If the
lang
attribute is specified in the html tag then the converter picks locale based on the
lang
attribute. If there is
no
lang
attribute specified then the locale is based on the browser language setting. Default value for locale is "en". For example, if locale is "en-US",
the default for time is 12-hour format and if locale is "fr", the default for time is 24-hour format.
<oj-input-date-time></oj-input-date-time>
Validation and Messaging
An editable component runs validation (normal or deferred) based on the action performed on it
(either by end-user or page author), and the state it was in when the action occurred. Examples
of actions are - creating a component, user changing the value of the component by interacting
with it, the app setting a value programmatically, the app calling the validate() method etc. At
the time the action occurs, the component could already be showing errors, or can have a deferred
error or have no errors.
These factors also determine whether validation errors/messages get shown to the user immediately
or get deferred. The following sections highlight the kinds of validation that are run and how
messages get handled.
messagesCustom
property is cleared
value
property is updated and the formatted value displayed on the
validate
method is called by app, all messages are
cleared and full validation run using the display value. See
validate
method on the sub-classes for details. Note: JET validation is designed to catch user input errors, and not invalid
data passed from the server; this should be caught on the server.
value
property changes due to programmatic
intervention deferred validation is run, after all messages and messagesCustom property are cleared.
reset
method is called, deferred validation is run
after all messages and messagesCustom property are cleared.
showMessages
method on the component
In the Redwood theme, by default all user assistance text shows inline. For input components, it shows when the field takes focus. In other components it shows all the time. See the user-assistance-density property for other ways the user assistance text can render, like in 'compact' mode, it will render as an icon on the label which when clicked will show the user assistance text in a notewindow.
The JET form component properties that are used for user assistance text are help.instruction, validator and converter hints, and help-hints. In the Redwood theme for clarity only one user assistance text shows to the user. The precedence rules are:
In the Alta theme all the user assistance text are displayed to the user. By default help.instruction and the validator/converter hints show in a notewindow that is displayed when the field takes focus. The help-hints render as a help icon on the label and when clicked show in a notewindow. Note: If there is no label, help-hints help icon will not show.
Sometimes a validator or converter hints shows that you do not want. To not show it, set the display-options.validator-hint and/or display-options.converter-hint property to 'none'.
required and placeholder properties also can be used to guide the user.
In Redwood, a required field shows the word Required under the field
when the field is empty and does not have focus.
Placeholder is shown when the field is empty and has focus.
Touch End User Information
Input element and calendar trigger icon
When not inline, shows the grid and moves the focus into the expanded date grid.
Time trigger icon
Shows the time picker and moves the focus into the expanded time picker
Input element with picker open
Set focus to the input. If hints, title or messages exist in a notewindow,
pop up the notewindow.
Picker
Swipe Left
Switch to next month (or previous month on RTL page).
Picker
Swipe Right
Switch to previous month (or next month on RTL page).
Input element
DownArrow or UpArrow
When not in inline mode, shows the calendar grid and moves the focus into the
expanded grid. When in inline mode, shows the time picker and moves the focus into the
expanded time picker
Input element
Shift + DownArrow or UpArrow
Shows the time picker and moves the focus into the expanded time picker
Input element
Close the grid.
Input Element
Tab In
Set focus to the input. If hints, title or messages exist in a notewindow,
pop up the notewindow.
Picker
Enter
Select the currently focused day
Picker
UpArrow
Move up in the grid.
Picker
DownArrow
Move down in the grid.
Picker
RightArrow
Move right in the grid.
Picker
LeftArrow
Move left in the grid.
Picker
Close the grid.
Picker
Move focus to first day of the month.
Picker
Move focus to last day of the month.
Picker
PageUp
Switch to previous month.
Picker
PageDown
Switch to next month.
Picker
Alt + PageUp
Switch to previous year.
Picker
Alt + PageDown
Switch to next year.
Picker
Ctrl + Alt + PageUp
Switch to previous by stepBigMonths.
Picker
Ctrl + Alt + PageDown
Switch to next by stepBigMonths.
Picker
Ctrl + Alt + T
Places focus on Today button if it exists.
For accessibility, set label-hint or associate an oj-label with the form component.
If there is no visible label, then to make this accessible to screen reader users,
set the label-hint and label-edge='none'
which renders an aria-label with the label-hint text.
If using an oj-label instead of the
label-hint
attribute, then
put an
id
on the form component element, and set the oj-label's
for
attribute to be the form component's id.
The placeholder text is not read reliably by the screen reader. For accessibility reasons, you need to associate the text to its JET form component using aria-describedby.
Disabled content: JET supports an accessible luminosity contrast ratio, as specified in WCAG 2.0 - Section 1.4.3 "Contrast" , in the themes that are accessible. (See the "Theming" chapter of the JET Developer Guide for more information on which themes are accessible.) Note that Section 1.4.3 says that text or images of text that are part of an inactive user interface component have no contrast requirement. Because disabled content may not meet the minimum contrast ratio required of enabled content, it cannot be used to convey meaningful information.
Label and InputDateTime
The element will decorate its associated label with required and help
information, if the
required
and
help
attributes are set.
interface InputDateTimeElement<SP extends ojInputDateTimeSettableProperties = ojInputDateTimeSettableProperties>
//To typecheck the element APIs, import as below.
import { InputDateTimeElement } from "ojs/ojdatetimepicker";
//For the transpiled javascript to load the element's module, import as below
import "ojs/ojdatetimepicker";
For additional information visit:
Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.
In the Redwood theme the default max width of a text field is 100%. These max width convenience classes are available to create a medium or small field.
The contextMenu slot is set on the
oj-menu
within this element.
This is used to designate the JET Menu that this 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 JET Menu specified in this slot.
The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(),
or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.
To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which
table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.
Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.
List of asynchronous validators used by the component when performing validation.
Use
async-validators
when you need to
perform some validation work on the server. Otherwise, use
validators
, which are synchronous.
Each item in the Array is an instance that duck types
oj.AsyncValidator
.
Implicit validators created by a component when certain attributes
are present (e.g.
required
attribute) are separate from
validators specified through the
async-validators
attribute and the
validators
attribute.
At runtime when the component runs validation, it
combines the implicit validators with the list specified through the
validators
attribute and also the list specified through the
async-validators
attribute.
Error messages are shown as soon as each async validator returns;
we do not wait until all the async validators finish to show errors.
If the component's valid state changes for the worse, it is also updated
as each validator returns so valid will be invalidShown
as soon as the first validator has an Error.
It is recommended that you show the
value you are validating in the error message because if the async operation takes a while,
the user could be typing in a new value when the error message comes back
and might be confused what value the error is for. However, if the user enters a new value
(like presses Enter or Tab), a new validation lifecycle will start
and validation errors for the previous value will not be shown to the user.
If you need to format the value for the error message,
you can use e.g. for number
new NumberConverter.IntlNumberConverter(converterOption)
to get the converter instance,
then call
converter.format(value)
.
Hints exposed by validators are shown inline by default in the Redwood theme when the
field has focus.
In the Alta theme, validator hints are shown in a notewindow on focus,
or as determined by the
'validatorHint' property set on the
display-options
attribute.
In either theme, you can turn off showing validator hints by using the
'validatorHint' property set to 'none' on the
display-options
attribute.
Since async validators are run asynchronously, you should wait on the BusyContext before
you check valid property or the value property. Alternatively you can add a callback to
the validChanged or valueChanged events.
The steps performed always, running validation and clearing messages is the same as
for the
oj.inputBase#validators
attribute.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-async-validators-changed
Dictates component's autocomplete state.
This attribute indicates whether the value of the control can be automatically
completed by the browser. The common values are "on" and "off".
Since this attribute passes through to the input element unchanged, you can look at the html specs for detailed information for how browsers behave and what values besides "on" and "off" you can set. The html spec says the default is "on", so when autocomplete is not explicitly set, the browsers treat it as "on".
on-autocomplete-changed
Autofocus is a Boolean that reflects the autofocus attribute, If it is set to true
then the associated component will get input focus when the page is loaded.
Setting this property doesn't set the focus to the component:
it tells the browser to focus to it when the element is inserted in the document.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-autofocus-changed
A datetime converter instance or a Promise to a datetime converter instance
or one that duck types
oj.DateTimeConverter
.
The default options for converter vary by theme. To use different value for options, create a custom converter and set it in this property. For example:
inputDateTime.converter = new DateTimeConverter.IntlDateTimeConverter({formatType: 'datetime',dateFormat: 'short',timeFormat: 'short'});
If the timezone option is provided in the converter, the Today button will highlight the current day based on the timezone specified in the converter.
The hint exposed by the converter is shown inline by default in the Redwood theme when
the field has focus.
In the Alta theme, converter hints are shown in a notewindow on focus,
or as determined by the
'converterHint' property set on the
display-options
attribute.
In either theme, you can turn off showing converter hints by using the
'converterHint' property set to 'none' on the
display-options
attribute.
In the Redwood theme, only one hint shows at a time, so the precedence rules are:
help.instruction shows; if no help.instruction then validator hints show;
if none, then help-hints.definition shows; if none, then converter hint shows.
help-hints.source always shows along with the other help or hint.
When
converter
property changes due to programmatic
intervention, the element performs various tasks based on the current state it is in.
converter
property changes, the
display value is refreshed.
converter
property changes then all element messages are
cleared and full validation run using the current display value on the element.
value
property is not updated, and the error is shown.
The display value is not refreshed in this case.
value
property is updated; page author can listen to the
valueChanged
event to clear custom errors. The
display value is refreshed with the formatted value provided by converter.
messagesCustom
property is not cleared.
Page authors can
choose to clear it explicitly when setting the converter option.
on-converter-changed
Note that Jet framework prohibits setting subset of properties which are object types.
$inputDateTimeDatePickerOptionDefault
, which is merged with other defaults.
on-date-picker-changed
The number of months to show at once. Note that if one is using a
numberOfMonths > 4 then one should define a CSS rule for the width of
each of the months. For example if numberOfMonths is set to 6 then one
should define a CSS rule .oj-datepicker-multi-6 .oj-datepicker-group
providing the width each month should take in percentage.
See the date-picker attribute for usage examples. Number of months to step back/forward for the (Alt + Page up) + (Alt + Page down) key strokes.
See the
date-picker
attribute for usage examples.
"numberOfMonths"
- When set to this string, will use numberOfMonths property value as value.
<number>
- Number of months to step back/forward.
See the date-picker attribute for usage examples. Whether week of the year will be shown in the datepickeer. The default calculation follows the ISO 8601 definition: the week starts on Monday, the first week of the year contains the first Thursday of the year. This means that some days from one year may be placed into weeks 'belonging' to another year.
See the date-picker attribute for usage examples. The range of years displayed in the year drop-down: either relative to today's year ("-nn:+nn"), relative to the currently selected year ("c-nn:c+nn"), absolute ("nnnn:nnnn"), or combinations of these formats ("nnnn:-nn").
See the
date-picker
attribute for usage examples.
Additional info to be used when rendering the day
This should be a JavaScript Function reference which accepts as its argument the following JSON format
{fullYear: Date.getFullYear(), month: Date.getMonth()+1, date: Date.getDate()}
and returns null or all or partial JSON data of
{disabled: true|false, className: "additionalCSS", tooltip: 'Stuff to display'}
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-day-formatter-changed
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()+1, 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].
Note that this property will override the value of the dayFormatter property. Setting both dayFormatter and dayMetaData properties is not supported.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-day-meta-data-changed
The oj-label sets the described-by attribute programmatically on the form component.
This attribute is not meant to be set by an application developer directly.
The described-by is copied to the aria-describedby
attribute on the component's inner dom element, and it is needed
for accessibility.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-described-by-changed
When the
disabled
property changes due to programmatic
intervention, the component may clear messages and run validation in some cases.
value="{{currentValue}}" required disabled
,
deferred validation is skipped.
value
property is updated. Page authors can listen to the
valueChanged
event to clear custom errors.
on-disabled-changed
Display options for auxiliary content that determines whether or not it should be displayed.
In the Redwood theme, the sub-properties of the display-options configure whether or not the
types of information is shown. The values of these sub-properties are either
'display' or 'none'.
In the Alta theme the sub-properties of the display-options configure aspects of visual behavior such as where
types of information is shown. The values of these sub-properties are specified either as an
array of strings or a string. When an array is specified the first display option takes
precedence over the second display option and so on.
When display-options changes due to programmatic intervention, the component updates its
display to reflect the updated choices. For example, if you don't want to show the converter
hint, set the display-options.converter-hint to 'none'.
A side note: help.instruction and message detail text can include formatted HTML text, whereas
hints and message summary text cannot. If you use formatted text, it should be accessible
and make sense to the user if formatting wasn't there.
The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre.
To format the help.instruction, you could do this:
<html>Enter <b>at least</b> 6 characters</html>
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-display-options-changed
Display options for auxiliary converter hint text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the converter hint should be displayed.
The supported values are 'display' and 'none'.
If you don't want to show the converter hint, set display-options.converter-hint to 'none'.
It defaults to 'display'.
To control where the hints display, e.g., inline or in a notewindow,
then use the
user-assistance-density
attribute.
In the Alta theme this attribute determines where and whether to show the converter hint.
If you don't want to show the converter hint, set display-options.converter-hint to 'none'.
The Alta theme supports these attribute values, most of which are deprecated:
Array|'placeholder'|'notewindow'|'none'.
The default is ['placeholder','notewindow'].
Display options for auxiliary help instruction text that determines where it should be displayed
in relation to the component.
Display options for auxiliary message text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the messages should be displayed.
The supported values are 'display' and 'none'.
If you don't want to show messages, set display-options.messages to 'none'.
It defaults to 'display'.
To control where the messages display, e.g., inline or in a notewindow,
then use the
user-assistance-density
attribute.
In the Alta theme this attribute determines where and whether to show the messages.
If you don't want to show messages, set display-options.messages to 'none'.
The Alta theme supports these attribute values, most of which are deprecated:
Array|'inline'|'notewindow'|'none'.
The default is ['inline'].
Display options for auxiliary validator hint text. The supported attribute values are theme dependent.
In the Redwood theme, this attribute determines whether or not the validator hint should be displayed.
The supported values are 'display' and 'none'.
If you don't want to show the validator hint, set display-options.validator-hint to 'none'.
It defaults to 'display'.
To control where the hints display, e.g., inline or in a notewindow,
then use the
user-assistance-density
attribute.
In the Alta theme this attribute determines where and whether to show the validator hint.
If you don't want to show the validator hint, set display-options.validator-hint to 'none'.
The Alta theme supports these attribute values, most of which are deprecated:
Array|'notewindow'|'none'.
The default is ['notewindow'].
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-help-changed
A type of user assistance text. User assistance text is used to provide
guidance to help the user understand what data to enter or select.
In the Redwood theme for clarity only one user assistance text shows to the user. The precedence rules are:
In the Redwood theme, by default all user assistance text shows inline. For input components, it shows when the field takes focus. In other components it shows all the time. See the user-assistance-density property for other ways the user assistance text can render. In Alta theme, help.instruction displays in a notewindow when the field takes focus. How is help.instruction better than the html 'title' attribute? The html 'title' attribute only shows up as a tooltip on mouse over, not on keyboard and not in a mobile device. So the html 'title' would only be for text that is not important enough to show all users, or for text that you show the users in another way as well, like in the label. Also you cannot theme the native browser's title window like you can the JET notewindow, so low vision users may have a hard time seeing the 'title' window. For these reasons, the JET EditableValue components do not use the HTML's 'title' attribute and instead use the help.instruction attribute. To include formatted text in the help.instruction, format the string using html tags. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre. For example the help.instruction might look like:
<oj-some-element help.instruction="<html>Enter <b>at least</b> 6 characters</html>"></oj-some-element>
If you use formatted text, it should be accessible
and make sense to the user if formatting wasn't there.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-help-hints-changed
A type of user assistance text. User assistance text is used to provide
guidance to help the user understand what data to enter or select. help-hints could
come from a help system.
In the Redwood theme for clarity only one user assistance text shows to the user. The precedence rules are:
In the Alta theme the help-hint.definition shows up when the user hovers over the help icon on the label, or tabs into the help icon, or press and holds the help icon on a mobile device.
No formatted text is available for help definition attribute.
See the help-hints attribute for usage examples.
Help source URL associated with the component.In the Redwood theme, the help-hints.source will show as a link inline to the field. For input components, it shows when the field takes focus. For other components, it shows all the time.
In the Alta theme, the help-hints.source will show as a a help icon next to the label. When clicked the page will navigate to the source url. For security reasons we only support urls with protocol 'http:' or 'https:'. If the url doesn't comply we ignore it and throw an error. Pass in an encoded URL since we do not encode the URL.
See the help-hints attribute for usage examples.
Determines if keyboard entry of the text is allowed. When disabled the picker must be used to select a date. Default value depends on the theme. In alta-android, alta-ios and alta-windows themes, the default is
"disabled"
and it's
"enabled"
for alta web theme.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-keyboard-edit-changed
Specifies how the label of the component is created when the
label-hint
attribute is set on the component.
The default value varies by theme, and it works well for the theme in most cases.
If the component is in an oj-form-layout, the label-edge attribute could come from the oj-form-layout's label-edge attribute.
The oj-form-layout component uses the
MetadataTypes.PropertyBinding
provide
property to provide and uses the
MetadataTypes.ProvideProperty
transform
property to transform its
label-edge
attribute to any descendent components that are configured to consume it.
For example, if the oj-form-layout's label-edge attribute is set to "top" or "start", and a descendent form component does
not have its label-edge attribute set, the form component's label-edge will be the transformed value "provided".
label-hint
attribute.
For text input components (such as oj-input-text), the label floats over the input element but moves up on focus or when the component has a value.
For non-text input components (such as oj-checkboxset), the label is created at the top of the component and doesn't move.
The component will not have a label, regardless of whether it's in an oj-form-layout or not.
If the component has a
label-hint
attribute but no labelled-by, aria-label, or aria-labelledby attribute, the label-hint value will be used as the aria-label.
Note that if the component already has an external label, "none" should not be specified and "provided" should be used instead. Otherwise it may end up with conflicting label information.
Label is provided by the parent if the parent is an oj-form-layout.oj-form-layout provides the label using the label-hint from the form control and the label-edge from oj-form-layout.
If there is no oj-form-layout, use an oj-label.
Property change listener attribute ( must be of type function, see Events and Listeners for additional information. )
on-label-edge-changed
Represents a hint for rendering a label on the component.
This is used in combination with the label-edge attribute to control how the label should be rendered.
When label-edge is "provided", it gives a hint to oj-form-layout parent element to create an oj-label element for the component. When the
label-hint
attribute changes, oj-form-layout element refreshes to
display the updated label information.
When label-edge is "inside", it gives a hint to the component itself to render a label.
When label-edge is "none", and if the component has no labelled-by, aria-label, or aria-labelledby attribute, the label-hint value will be used as the aria-label.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-label-hint-changed
The oj-label sets the labelledBy property programmatically on the form component
to make it easy for the form component to find its oj-label component (a
document.getElementById call.)
The application developer should use the 'for'/'id api
to link the oj-label with the form component;
the 'for' on the oj-label to point to the 'id' on the input form component.
This is the most performant way for the oj-label to find its form component.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-labelled-by-changed
The maximum selectable datetime, in ISO string format. When set to null, there is no maximum.
So it can be properly compared with the value the user selects, this should be in the same format
as the converter's isoStrFormat. By default, value is a local isostring for oj-input-date-time.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-max-changed
List of messages an app would add to the component when it has business/custom validation
errors that it wants the component to show. This allows the app to perform further validation
before sending data to the server. When this option is set the message shows to the
user right away. To clear the custom message, set
messagesCustom
back to an empty array.
Each message in the array is an object that duck types oj.Message. See Message for details. message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre. To format the message detail, you could do this:
<html>Enter <b>at least</b> 6 characters</html>
See the
Validation and Messages
section
for details on when the component clears
messagesCustom
;
for example, when full validation is run.
In the Redwood theme, the Message summary is not displayed to the user, so make sure to have a Message detail
set in your Message object.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-messages-custom-changed
The minimum selectable datetime, in ISO string format. When set to null, there is no minimum.
So it can be properly compared with the value the user selects, this should be in the same format
as the converter's isoStrFormat since the value the user selects is parsed with the converter. By default, value is a local isostring for oj-input-date-time.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-min-changed
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-name-changed
Attributes specified here will be set on the picker DOM element when it's launched.
The supported attribute is
class
, which is appended to the picker's class, if any.
Note: 1) pickerAttributes is not applied in the native theme.
2) setting this property after element creation has no effect.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-picker-attributes-changed
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-placeholder-changed
The
rawValue
is the read-only property for retrieving
the current value from the input field in string form. The main consumer of
rawValue
is a converter.
rawValue
updates on the 'input' javascript event,
so the
rawValue
changes as the value of the input is changed.
If the user types in '1,200' into the field, the rawValue will be '1', then '1,', then '1,2',
..., and finally '1,200'. Then when the user blurs or presses
Enter the
value
property gets converted and validated
(if there is a converter or validators) and then gets updated if valid.
This is a read-only attribute so page authors cannot set or change it directly.
Property change listener attribute ( must be of type function, see Events and Listeners for additional information. )
on-raw-value-changed
Whether the component is readonly. The readonly property sets or returns whether an element is readonly, or not.
A readonly element cannot be modified. However, a user can tab to it, highlight it, focus on it, and copy the text from it.
If you want to prevent the user from interacting with the element, use the disabled property instead.
The default value for readonly is false. However, if the form component is a descendent of
oj-form-layout
, the default value for readonly could come from the
oj-form-layout
component's readonly attribute.
The
oj-form-layout
uses the
MetadataTypes.PropertyBinding
provide
property to provide its
readonly
attribute value to be consumed by descendent components.
The form components are configured to consume the readonly property if an ancestor provides it and
it is not explicitly set.
For example, if the oj-form-layout's readonly attribute is set to true, and a descendent form component does
not have its readonly attribute set, the form component's readonly will be true.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-readonly-changed
Allows applications to specify whether to render date and time pickers
in JET or as a native picker control.
Valid values: jet, native
Default value depends on the theme. In alta-android, alta-ios and alta-windows themes, the
default is "native" and it's "jet" for alta web theme.
8.0.0
The "native" mode rendering is deprecated because JET is promoting a consistent Oracle UX over native look and feel in Redwood. Since this property takes only two values the property itself is deprecated. The theme variable "$inputDateTimeRenderModeOptionDefault" is also deprecated for the same reason.
Applications get the functionality of the native picker. Native picker is
not available when the picker is inline, defaults to 'jet' instead.
Note that the native renderMode will attempt to load a Cordova plugin that
will launch the native picker. If the plugin is not found, the default JET
picker will be used.
With native renderMode, the functionality that is sacrificed compared to jet renderMode are:
on-render-mode-changed
This property set to
false
implies that a value is not required to be provided by the user.
This is the default.
This property set to
true
implies that a value is required to be provided by the user.
In the Redwood theme, by default, a Required text is rendered inline when the field is empty.
If user-assistance-density is 'compact', it will show on the label as an icon.
In the Alta theme the input's label will render a required icon.
The Required error text is based on Redwood UX designs, and it is not recommended that
it be changed.
To override the required error message,
use the
translations.required
attribute.
The component's label text is passed in as a token {label} and can be used in the message detail.
When required is set to true, an implicit
required validator is created, i.e.,
new RequiredValidator()
. The required validator is the only
validator to run during initial render, and its error is not shown to the user at this time;
this is called deferred validation. The required validator also runs during normal validation;
this is when the errors are shown to the user.
See the
Validation and Messaging
section for details.
When the
required
property changes due to programmatic intervention,
the component may clear component messages and run validation, based on the current state it's in.
value
property is not updated and the error is shown.
value
property is updated; page author can listen to the
valueChanged
event on the component to clear custom errors.
messagesCustom
property is not cleared.
on-required-changed
Note that Jet framework prohibits setting subset of properties which are object types.
on-time-picker-changed
Time increment to be used for InputDateTime, the format is hh:mm:ss:SS.
See the time-picker attribute for usage examples.
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 the component does not contain any translatable resource, the default value of this attribute will be
null
. If not, an object containing all resources relevant to the component.
If this component has translations, their documentation immediately follows this doc entry.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-translations-changed
Provides properties to customize the hint and message text used by the implicit date restriction validator associated to the InputDateTime and InputDate components.
See the translations attribute for usage examples.
Hint text used by the implicit date restriction validator associated to the InputDateTime and InputDate components.
See the translations attribute for usage examples.
Message detail for the implicit date restriction validator associated to the InputDateTime and InputDate components. Message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre.
See the translations attribute for usage examples.
Message summary for the implicit date restriction validator associated to the InputDateTime and InputDate components.
See the translations attribute for usage examples.
Provides properties to customize the hint and message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
See the translations attribute for usage examples.
Provides properties to customize the hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
See the translations attribute for usage examples.
Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.inRange is shown when both min and max are set, and is used to tell the user the allowed number range.
See the translations attribute for usage examples.
Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.max is shown when max is set and min is not set, and is used to tell the user the allowed maximum.
See the translations attribute for usage examples.
Hint text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. hint.min is shown when min is set and max is not set, and is used to tell the user the allowed minimum.
See the translations attribute for usage examples.
Provides properties to customize the error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. Message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre.
See the translations attribute for usage examples.
Error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageDetail.rangeOverflow is shown when max is set, and the value is greater than the maximum.
See the translations attribute for usage examples.
Error message text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageDetail.rangeUnderflow is shown when min is set, and the value is less than the minimum.
See the translations attribute for usage examples.
Provides properties to customize the error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components.
See the translations attribute for usage examples.
Error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageSummary.rangeOverflow is shown when max is set, and the value is greater than the maximum.
See the translations attribute for usage examples.
Error message summary text used by the implicit datetime range validator associated to the InputDateTime, InputDate, and InputTime components. messageSummary.rangeUnderflow is shown when min is set, and the value is less than the minimum.
See the translations attribute for usage examples.
Provides properties to customize the message text used by the implicit regexp validator associated to the InputText and TextArea components.
See the translations attribute for usage examples.
Provides properties to customize the error message detail used by the implicit regexp validator associated to the InputText and TextArea components. Message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre.
See the translations attribute for usage examples.
Provides properties to customize the error message summary used by the implicit regexp validator associated to the InputText and TextArea components.
See the translations attribute for usage examples.
Provides properties to customize the summary, detail and hint text used by the implicit required validator associated to any editable component that supports the required option.
See the translations attribute and required option for usage examples.
Message text that describes the details of the required validation error. Message detail text can include formatted HTML text, whereas hints and message summary text cannot. If you use formatted text, it should be accessible and make sense to the user if formatting wasn't there. The allowed html tags are: span, b, i, em, br, hr, li, ol, ul, p, small, pre.
See the translations attribute for usage examples.
The aria-label text for the time input in a oj-date-time-picker. When the screen reader user tabs to the input, they will hear 'Time' so that they know they are on the time field of the oj-date-time-picker.
See the translations attribute for usage examples. Specifies the density of the form component's user assistance presentation. It can be shown inline with reserved rows to prevent reflow if a user assistance text shows up, inline without reserved rows that would reflow if a user assistance text shows up, or it can be shown compactly in a popup instead.
The default value is 'reflow' when the form component is not a descendent of an oj-form-layout component. When the form component is a descendent of an oj-form-layout, the default value comes from the oj-form-layout's
user-assistance-density
attribute value.
The oj-form-layout component uses the
MetadataTypes.PropertyBinding
provide
property to provide its
user-assistance-density
attribute value to be consumed by descendent components.
The form components are configured to consume the
user-assistance-density
property if an
ancestor provides it and it is not explicitly set on the form component.
Example, oj-form-layout defaults user-assistance-density='efficient', so all its
form components descendents will have user-assistance-density='efficient' by default.
Messages, help, hints, and required will not be shown inline; they will show in a mode that keeps the screen more compact, like
a popup for the messages, and a required icon to indicate Required.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-user-assistance-density-changed
The current valid state of the component. It is evaluated on initial render.
It is re-evaluated
on-valid-changed
List of validators, synchronous or asynchronous,
used by component along with asynchronous validators from the deprecated async-validators option
and the implicit component validators when performing validation. Each item is either an
instance that duck types
oj.Validator
or
oj.AsyncValidator
.
Implicit validators are created by the element when certain attributes are present.
For example, if the
required
attribute is set, an implicit
oj.RequiredValidator
is created. If the
min
and/or
max
attribute
is set, an implicit
oj.DateTimeRangeValidator
is created. If the
dayFormatter
attribute is set,
an implicit
oj.DateRestrictionValidator
is created.
At runtime when the component runs validation, it
combines all the implicit validators with all the validators
specified through this
validators
attribute, and runs
all of them.
Hints exposed by validators are shown inline by default in the Redwood theme when the
field has focus.
In the Alta theme, validator hints are shown in a notewindow on focus,
or as determined by the
'validatorHint' property set on the
display-options
attribute.
In either theme, you can turn off showing validator hints by using the
'validatorHint' property set to 'none' on the
display-options
attribute.
When
validators
property changes due to programmatic
intervention, the element may decide to clear messages and run validation, based on the
current state it is in.
validators
changes then all element messages are cleared
and full validation run using the display value on the element.
value
property is not updated and the error is shown.
value
property is updated; page author can listen to the
valueChanged
event to clear custom errors.
messagesCustom
property is not cleared.
on-validators-changed
The value of the InputDateTime element which should be an ISOString.
If the converter's timeZone option is
not set and the value is a zulu or offset (not local) ISOString,
the timeZone will default to the user's system's timeZone.
Property change listener attribute (
must be of type function, see
Events and Listeners
for additional information.
)
on-value-changed
Supported values are:
The default animation can be cancelled by calling
event.preventDefault
, followed by
a call to
event.detail.endCallback
.
event.detail.endCallback
should be
called immediately after
event.preventDefault
if the application merely wants to cancel animation,
or it should be called when the custom animation ends if the application is invoking another animation function. Failure to
call
event.detail.endCallback
may prevent the component from working properly.
For more information on customizing animations, see the documentation of AnimationUtils .
The default animations are controlled via the theme: // default animations for notewindow help and hints and messages $popupTailOpenAnimation: (effect: "zoomIn", transformOrigin: "#myPosition") !default; $popupTailCloseAnimation: (effect: "none") !default; // default animations for Redwood's inline messages shown when userAssistanceDensity // is reflow or efficient. $messageComponentInlineOpenAnimation: (effect: "fadeIn", duration: "100ms", timingFunction: "linear") !default; $messageComponentInlineCloseAnimation: (effect: "fadeOut", duration: "100ms", timingFunction: "linear") !default; // default animations for Alta's "inline" display option $messageComponentInlineOpenAnimation: (effect: "expand", startMaxHeight: "#oldHeight") !default; $messageComponentInlineCloseAnimation: (effect: "collapse", endMaxHeight: "#newHeight") !default;
messagesCustom
-
and updates the component's display value using the attribute value. User entered values will be
erased when this method is called.
Performs a batch set of properties.
The type of value for each property being set must match the type of the property as specified in this
API document.
Sets a property or a subproperty (of a complex property) and notifies the component
of the change, triggering a [property]Changed event.
The value should be of the same type as the type of the attribute mentioned in this API document.
Takes all deferred messages and shows them.
It then updates the valid property; e.g.,
if the valid state was "invalidHidden"
before showMessages(), the valid state will become "invalidShown" after showMessages().
If there were no deferred messages this method simply returns.
Validates the component's display value using the converter and all validators registered on
the component and updates the
value
option by performing the
following steps.
value
option is updated using the display value. Otherwise all
validators are run in sequence using the parsed value from the previous step. The implicit
required validator is run first if the component is marked required. When a validation error is
encountered it is remembered and the next validator in the sequence is run.
value
option is updated.
Promise resolves to "valid" if there were no converter parse errors and the component passed all validations. The Promise resolves to "invalid" if there were converter parse errors or if there were validation errors.
Documentation generated by JSDoc 3.4.3 on Fri Feb 16 2024 22:27:14 GMT+0000 (Coordinated Universal Time)眼睛小的匕首 · 金洪名筑-甲子塘金洪名筑-深圳房地产信息网 3 月前 |