|
|
Line 1: |
Line 1: |
− | {{ScoutPage|cat=Component Model}}
| + | The Scout documentation has been moved to https://eclipsescout.github.io/. |
− | | + | |
− | Type of {{ScoutLink|Concepts|Field|field}} to display a {{ScoutLink|Concepts|Form|form}}.
| + | |
− | | + | |
− | * implements: {{ScoutJavadoc|IWrappedFormField|I}}
| + | |
− | * extends: {{ScoutJavadoc|AbstractWrappedFormField|C}}
| + | |
− | | + | |
− | == Description ==
| + | |
− | A WrappedFormField is to show another form in this form.
| + | |
− | | + | |
− | Two methods are useful to handle the {{ScoutLink|Concepts|Form|AbstractForm}} that will be embedded:
| + | |
− | * getInnerForm()
| + | |
− | * setInnerForm()
| + | |
− | | + | |
− | When you choose to embed a form in another form, you are responsible of the lifecycle of the inner-form. This mean that you need to initialize, import/export the data, validate the form manually. Depending on your use case, you might want to reuse some of the existing function.
| + | |
− | | + | |
− | Here is a snippet showing how you can set a form on a WrappedFormField:
| + | |
− | <source lang="java">
| + | |
− | MyForm form = new MyForm();
| + | |
− | | + | |
− | //formfield is the WrappedFormField field. | + | |
− | formfield.setInnerForm(form);
| + | |
− | form.setHandler(new NullFormHandler());
| + | |
− | form.initForm(); // Must initialize inner form for fields to be initialized
| + | |
− | | + | |
− | //additionally it is possible import data from an MyFormData formdata:
| + | |
− | form.importFormData(formData);
| + | |
− | </source>
| + | |
− | | + | |
− | == Properties ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|GetConfigured Methods|getConfiguredXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also {{ScoutLink|Concepts|Field|Field}} for the properties that all fields have in common.
| + | |
− | | + | |
− | == Events ==
| + | |
− | ''Defined with {{ScoutLink|Concepts|Exec_Methods|execXxxxxx()}} methods''.
| + | |
− | | + | |
− | See also {{ScoutLink|Concepts|Field|Field}} for the events that all fields have in common.
| + | |
− | | + | |
− | | + | |
− | == See Also ==
| + | |
− | * {{ScoutLink|Concepts|Field|Field}}
| + | |