Fieldset
Contents |
Fieldset is a container widget and is mainly used for the following ones:
- Visual grouping of fields. Different styling being possible (background color, borders, label, positioning).
- Handling of default submit button for a set of fields.
Also, when focusing on the elements and pressing ENTER, it executes the onSubmit callback
The simple way to add Fieldset widget to your application is as follows
File /widgets/fieldset/Snippet.tpl
label: "Sample fieldset1",
width: 250
}}
<p>Some content here...</p>
The whole list of configuration parameters is available in FieldsetCfg bean.
Nested Fieldset
Fieldsets can be nested.
File /widgets/fieldset/Snippet.tpl
label: "Sample fieldset1",
width: 350
}}
<p>Some content in the root fieldset</p>
{@aria:Fieldset {
label: "Nested Fieldset",
width: 250
}}
<p>Some content in the nested Fieldset</p>
{/@aria:Fieldset}
Action
Fieldset is an action widget, meaning that it can call an onSubmit callback function called when the user presses ENTER in a field inside the fieldset.For instance, if an onSubmit callback is implemented on the root Fieldset, then all the nested fieldset bubbles to the root fieldset, provided that the child fieldset implemented onSubmit callback should return true.
File /widgets/fieldset/Snippet.tpl
label: "Sample fieldset1",
width: 600,
onSubmit: fieldsetSubmit
}}
<p>Some content here...</p>
Binding
For fieldset widget, the property bindable is tooltip and can be bound to a value in the datamodel.
For more information please read the article on Widget Bindings.
File /widgets/fieldset/Snippet.tpl
width : 400,
bind: {
tooltip: {
to : "view:tooltip",
inside : data
}
}
}}
<p>Some content here...</p>
