Java Code Examples for com.smartgwt.client.widgets.form.DynamicForm#getFields()
The following examples show how to use
com.smartgwt.client.widgets.form.DynamicForm#getFields() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NsesssV2Form.java From proarc with GNU General Public License v3.0 | 5 votes |
/** Resets nested Identifier members. */ private void resetIdentifierField(FormItem fi, boolean clear, boolean visible, boolean required) { Canvas canvas = ((RepeatableFormItem) fi).getCanvas(); RepeatableForm rf = (RepeatableForm) canvas; for (Row row : rf.getRows()) { ValuesManager vm = row.getForm(); DynamicForm[] nestedForms = vm.getMembers(); for (DynamicForm nf : nestedForms) { for (FormItem formItem : nf.getFields()) { formItem.setRequired(required); } } } resetField(fi, clear, visible, required); }
Example 2
Source File: RepeatableFormItem.java From proarc with GNU General Public License v3.0 | 5 votes |
public static void clearErrors(DynamicForm repeateableItemContainer, boolean show) { // It should help to draw inner form errors properly. for (FormItem formItem : repeateableItemContainer.getFields()) { if (formItem instanceof RepeatableFormItem) { ((RepeatableFormItem) formItem).clearErrors(show); } } }
Example 3
Source File: RepeatableFormItem.java From proarc with GNU General Public License v3.0 | 3 votes |
/** * Helps to show error messages related to all repetitions of the item * as no repetition contains given value. * It should be called by {@link DynamicForm#showErrors() } implementation. * * @param repeateableItemContainer container holding repeatable form items as members * @see #addValidationError */ public static void showErrors(DynamicForm repeateableItemContainer) { for (FormItem formItem : repeateableItemContainer.getFields()) { if (formItem instanceof RepeatableFormItem) { ((RepeatableFormItem) formItem).showErrors(); } } }