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.
Slots
JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.
-
Default
-
The
<oj-form-layout>element only accepts element children in the Default slot. Content in<oj-form-layout>'s Default slot will be laid out in a row/column style form layout.- Since:
- 4.1.0
Attributes
-
colspan-wrap :"nowrap"|"wrap"
-
Specifies how to fit components with colspan attribute in the form layout, when there are fewer columns left in the current row than the colspan value specifies.
The default value depends on the theme.
Supported Values:
Value Description "nowrap"The component will occupy the remaining columns in the current row. "wrap"The component will start from the first column of the next row. Names
Item Name Property colspanWrapProperty change event colspanWrapChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-colspan-wrap-changed -
direction :"column"|"row"
-
Specifies the layout direction of the form layout children.
- Default Value:
"column"
Supported Values:
Value Description "column"Components are laid out in columns "row"Components are laid out in rows Names
Item Name Property directionProperty change event directionChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-direction-changed -
label-edge :"inside"|"start"|"top"
-
Specifies how the label is created and aligned with its form control.
The default value varies by theme, and it works well for the theme in most cases. If this attribute is set to an explicit value, The label-edge attribute on all form controls should also be set to an explict value. For example, if this attribute is set to "start" or "top", the label-edge attribute of all form controls should be set to "provided".
Supported Values:
Value Description "inside"oj-form-layout will not create any label. Label will be created by the form control if the form control has its label-edge set to "inside". Please see the specific form control's label-edge attribute documentation for details. "start"oj-form-layout will create a label that's before the start of the form control if the form control has its label-edge set to "provided". If the form control specifies "inside" or "none" as its label-edge, no label will be created by oj-form-layout. "top"oj-form-layout will create a label that's on top of the form control if the form control has its label-edge set to "provided". If the form control specifies "inside" or "none" as its label-edge, no label will be created by oj-form-layout. Names
Item Name Property labelEdgeProperty change event labelEdgeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-edge-changed -
label-width :string
-
Specifies the label width.
This specifies the width of the oj-label elements. This can be any legal CSS width.
- Default Value:
"33%"
Names
Item Name Property labelWidthProperty change event labelWidthChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-width-changed -
label-wrapping :"truncate"|"wrap"
-
Specifies if the label text should wrap or truncate.
- Default Value:
"wrap"
Supported Values:
Value Description "truncate"Label will truncate if needed "wrap"Label will wrap if needed Names
Item Name Property labelWrappingProperty change event labelWrappingChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-label-wrapping-changed -
max-columns :number
-
Specifies the maximum number of columns. The actual number of columns may be less, depending on the direction attribute.
If direction is "column", the layout is responsive and browsers automatically reduce the number of columns to fit the width of the viewport.
If direction is "row", the number of columns is fixed to the max-columns value. Applications can choose to make it responsive by using ResponsiveKnockoutUtils to adjust the value. See the oj-form-layout - Across demo for an example.
- Default Value:
1
Names
Item Name Property maxColumnsProperty change event maxColumnsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-max-columns-changed
Methods
-
getProperty(property) : {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. Returns:
- Type
- any
-
refresh() : {void}
-
Refreshes the visual state of the component.
Returns:
- Type
- void
-
setProperties(properties) : {void}
-
Performs a batch set of properties.
Parameters:
Name Type Description propertiesObject An object containing the property and value pairs to set. Returns:
- Type
- void
-
setProperty(property, value) : {void}
-
Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. Returns:
- Type
- void