Create a Layout in a Rule Set
A rule set's layout defines the fields that are displayed in a dynamic component at runtime. You create and configure the component's layouts in the Rule Sets editor.
Note:
Whereas a Layout (with a capital L) is a resource that is available to everything in the extension, a layout (lowercase) is an intrinsic part of a particular rule set.When extending a dynamic form or table, each rule set contains a default layout that is seeded for you. You can't edit the default layout, but you can duplicate it and use it as the basis for a new layout. The default layout is always used in the last rule of the display logic tree.
The fields you can display in a rule set's layout are determined by the fields available from the data resource used by the component. This data resource is defined in the Layout containing the rule set you're configuring. For example, the Layout might define a data resource that has five fields. You can choose which of these five fields (and also any other virtual or calculated fields defined in the same Layout) that you want to display in the dynamic component—and the order in which they should appear—but you can't include fields from other data resources. For details on creating fields in Layouts, see Create Fields For a Layout.
To create a new layout in a rule set:
Edit a Field's Properties in a Layout
When you edit a field's properties in a rule set's layout, your changes only apply to the field in the current layout. You might want to do this to override a field's properties in a specific layout, for example, to mark a field as Required or Read Only. If you want to edit a property so that it's the same in all layouts—for example, if you want it always to be Read Only—you should edit the field's properties in the Fields editor.
To edit a field's properties:
Use Conditions to Hide and Show Fields in a Layout
Fields in the active layout are displayed by default, but if you want to hide a field or group in a layout in some cases, for example, to hide it from everyone except managers, you can use the field's Show Field property to set conditions that determine when it is displayed. When you add conditions, the field is displayed only when the conditions you set are true. The conditions are only applied to the field in the layout you are editing.
To set display settings for a field in a layout:
Configure How Columns Are Rendered in a Dynamic Table Layout
When editing the layout for a dynamic table, you can edit the fields in the Properties pane to configure the width of each column in the table, and if the table is sortable by any of the fields. You can also "freeze" table columns, so that a column's content remains visible, and a horizontal scroll bar is used to scroll the table's content.
When you set the properties for a field in a layout, the settings only apply to the current layout. The other layouts are not affected.
To configure the properties for columns in a table layout:
- In the Rule Sets editor, open the dynamic table's layout.
- Select the field in the center pane that you want to edit.
When you select the field, you can see the field's properties in the Properties pane.
For fields in a dynamic table's layout, the Properties pane contains some display properties to control how the field is rendered in the table:
- Frozen Edge: Set this property to
start
orend
to "freeze" the column of the selected field. Selectstart
to pin the column at the beginning (which means it can't be scrolled past), orend
to freeze the column at the end (to lock it in view). For details, see Frozen Columns in the Oracle JET Developer Cookbook. - Sortable: This property determines if the table is sortable on the selected field.
- Width: This property sets the default width of the selected field column in the table.
- Minimum Width: This property sets the minimum width of the selected field column when the table is first rendered on the page. A user can manually resize the column width to make it narrower.
- Maximum Width: This property sets the maximum width of the selected field column when the table is first rendered on the page. A user can manually resize the column width to make it wider.
- Frozen Edge: Set this property to
Set a Field to Display as a Text Area in a Form
If a field's value is a long string, for example, when a field is used to display a long description, you can configure the field so that it is rendered as a multi-line text area in forms instead of the default single-line text field.
- To set a field to display as a text area in all layouts:
- To set a field to display as a text area in a particular form layout: