Package com.smartgwt.client.widgets.form.fields

Examples of com.smartgwt.client.widgets.form.fields.FormItem


        StaticTextItem nameItem = buildNameItem(propertyDefinitionMap);
        fields.add(nameItem);

        // Note: This field spans 3 columns.
        FormItem mapField = buildMapField(propertyDefinitionMap, propertyMap);
        fields.add(mapField);

        return fields;
    }
View Full Code Here


                        PropertyDefinitionSimple memberPropertyDefinitionSimple = (PropertyDefinitionSimple) propertyDefinitionList
                            .getMemberDefinition();
                        final String propertyName = memberPropertyDefinitionSimple.getName();
                        final PropertySimple newMemberPropertySimple = new PropertySimple(propertyName, null);

                        FormItem simpleField = buildSimpleField(memberPropertyDefinitionSimple, newMemberPropertySimple);
                        simpleField.setTitle(memberPropertyDefinitionSimple.getDisplayName());
                        simpleField.setShowTitle(true);
                        simpleField.setAlign(Alignment.CENTER);
                        simpleField.setDisabled(false);
                        simpleField.setRequired(true);
                        simpleField.setEndRow(true);

                        SpacerItem spacer = new SpacerItem();
                        spacer.setHeight(9);

                        form.setItems(simpleField, spacer);
                        vLayout.addMember(form);

                        final IButton okButton = new EnhancedIButton(MSG.common_button_ok(), ButtonColor.BLUE);
                        okButton.disable();
                        okButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                            public void onClick(ClickEvent clickEvent) {
                                propertyList.add(newMemberPropertySimple);

                                // Rebuild the select item options.
                                LinkedHashMap<String, String> memberValueToIndexMap = buildValueMap(propertyList);
                                membersItem.setValueMap(memberValueToIndexMap);

                                firePropertyChangedEvent(propertyList, propertyDefinitionList, true);
                                CoreGUI.getMessageCenter().notify(
                                    new Message(MSG.view_configEdit_msg_4(), EnumSet.of(Message.Option.Transient)));

                                popup.destroy();
                            }
                        });

                        form.addItemChangedHandler(new ItemChangedHandler() {
                            public void onItemChanged(ItemChangedEvent itemChangedEvent) {
                                Object newValue = itemChangedEvent.getNewValue();
                                newMemberPropertySimple.setValue(newValue);

                                // Only enable the OK button, allowing the user to add the property to the map, if the
                                // property is valid.
                                boolean isValid = form.validate();
                                okButton.setDisabled(!isValid);
                            }
                        });

                        final IButton cancelButton = new EnhancedIButton(MSG.common_button_cancel());
                        cancelButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                            public void onClick(ClickEvent clickEvent) {
                                popup.destroy();
                            }
                        });

                        ToolStrip buttonBar = new ToolStrip();
                        buttonBar.setPadding(5);
                        buttonBar.setWidth100();
                        buttonBar.setMembersMargin(15);
                        buttonBar.setAlign(Alignment.CENTER);
                        buttonBar.setMembers(okButton, cancelButton);

                        vLayout.addMember(buttonBar);

                        popup.addItem(vLayout);
                        popup.show();

                        simpleField.focusInItem();
                    }
                }
            });

            footer.addMember(newButton);
View Full Code Here

        String value = propertySimple.getStringValue();
        if (null == value && null != propertyDefinitionSimple.getDefaultValue()) {
            value = propertyDefinitionSimple.getDefaultValue();
        }

        FormItem valueItem = null;

        boolean propertyIsReadOnly = isReadOnly(propertyDefinitionSimple, propertySimple);
        Log.debug("Building simple field for " + propertySimple + "(read-only:" + propertyIsReadOnly + ")...");

        // TODO (ips, 03/25/11): We eventually want to use StaticTextItems for read-only PASSWORD props too, but we have
        // to wait until we implement masking/unmasking of PASSWORD props at the SLSB layer first.
        if (propertyIsReadOnly && propertyDefinitionSimple.getType() != PropertySimpleType.PASSWORD) {
            valueItem = new StaticTextItem();
            String escapedValue = StringUtility.escapeHtml(value);
            valueItem.setValue(preserveTextFormatting ? "<pre>" + escapedValue + "</pre>" : escapedValue);
        } else {
            List<PropertyDefinitionEnumeration> enumeratedValues = propertyDefinitionSimple.getEnumeratedValues();
            if (enumeratedValues != null && !enumeratedValues.isEmpty()) {
                LinkedHashMap<String, String> valueOptions = new LinkedHashMap<String, String>();
                for (PropertyDefinitionEnumeration option : propertyDefinitionSimple.getEnumeratedValues()) {
                    valueOptions.put(option.getValue(), option.getName());
                }

                if (propertyDefinitionSimple.getAllowCustomEnumeratedValue()) {
                    valueItem = new ComboBoxItem();
                    ((ComboBoxItem) valueItem).setAddUnknownValues(true);
                } else {
                    if (valueOptions.size() > 3) {
                        valueItem = new SelectItem();
                    } else {
                        valueItem = new RadioGroupItem();
                    }
                }
                valueItem.setValueMap(valueOptions);

            } else {
                switch (propertyDefinitionSimple.getType()) {
                case STRING:
                case FILE:
                case DIRECTORY:
                case LONG:
                    // Treat values with type LONG as strings, since GWT does not support longs.
                    valueItem = new TextItem();
                    break;
                case LONG_STRING:
                    valueItem = new TextAreaItem();
                    break;
                case PASSWORD:
                    valueItem = new PasswordItem();
                    valueItem.setAttribute("autocomplete", "off");
                    break;
                case BOOLEAN:
                    RadioGroupItem radioGroupItem = new RadioGroupItem();
                    radioGroupItem.setVertical(false);
                    radioGroupItem.setValueMap(BOOLEAN_PROPERTY_ITEM_VALUE_MAP);
                    valueItem = radioGroupItem;
                    break;
                case INTEGER:
                    SpinnerItem spinnerItem = new SpinnerItem();
                    spinnerItem.setMin(Integer.MIN_VALUE);
                    spinnerItem.setMax(Integer.MAX_VALUE);
                    valueItem = spinnerItem;
                    break;
                case FLOAT:
                case DOUBLE:
                    valueItem = new FloatItem();
                    break;
                }
            }

            valueItem.setDisabled(propertyIsReadOnly || isUnset(propertyDefinitionSimple, propertySimple));

            List<Validator> validators = buildValidators(propertyDefinitionSimple, propertySimple);
            valueItem.setValidators(validators.toArray(new Validator[validators.size()]));

            if (isUnset(propertyDefinitionSimple, propertySimple)) {
                setValue(valueItem, null);
            } else {
                valueItem.setValue(preserveTextFormatting ? "<pre>" + value + "</pre>" : value);
            }

            if ((propertySimple.getConfiguration() != null) || (propertySimple.getParentMap() != null)
                || (propertySimple.getParentList() != null)) {
                valueItem.addChangedHandler(new ChangedHandler() {
                    public void onChanged(ChangedEvent changedEvent) {
                        updatePropertySimpleValue(changedEvent.getItem(), changedEvent.getValue(), propertySimple,
                            propertyDefinitionSimple);
                        // Only fire a prop value change event if the prop's a top-level simple or a simple within a
                        // top-level map.
                        if (shouldFireEventOnPropertyValueChange(changedEvent.getItem(), propertyDefinitionSimple,
                            propertySimple)) {
                            boolean isValid = changedEvent.getItem().validate();
                            firePropertyChangedEvent(propertySimple, propertyDefinitionSimple, isValid);
                        }
                    }
                });
                // Since spinnerItems only fire ChangedEvent once the spinner buttons are pushed
                // we add blur handler to pick up any changes to that field when leaving
                if (valueItem instanceof SpinnerItem) {
                    valueItem.addBlurHandler(new BlurHandler() {
                        @Override
                        public void onBlur(BlurEvent event) {
                            updatePropertySimpleValue(event.getItem(), event.getItem().getValue(), propertySimple,
                                propertyDefinitionSimple);
                            // Only fire a prop value change event if the prop's a top-level simple or a simple within a
                            // top-level map.
                            if (shouldFireEventOnPropertyValueChange(event.getItem(), propertyDefinitionSimple,
                                propertySimple)) {
                                boolean isValid = event.getItem().validate();
                                firePropertyChangedEvent(propertySimple, propertyDefinitionSimple, isValid);
                            }

                        }
                    });
                }
            }
        }

        valueItem.setName(propertySimple.getName());
        valueItem.setTitle("none");
        valueItem.setShowTitle(false);
        setValueAsTooltipIfAppropriate(valueItem, preserveTextFormatting ? "<pre>" + value + "</pre>" : value);

        valueItem.setRequired(propertyDefinitionSimple.isRequired());
        valueItem.setWidth(220);

        /*
                TODO: Click handlers seem to be turned off for disabled fields... need to find an alternative.
                valueItem.addClickHandler(new com.smartgwt.client.widgets.form.fields.events.ClickHandler() {
                    public void onClick(ClickEvent clickEvent) {
View Full Code Here

        this.form.editRecord(record);
        this.form.setSaveOperationType(DSOperationType.ADD);

        // But make sure the value of the "id" field is set to "0", since a value of null could cause the dataSource's
        // copyValues(Record) impl to choke.
        FormItem idItem = this.form.getItem(FIELD_ID);
        if (idItem != null) {
            idItem.setDefaultValue(ID_NEW);
            idItem.hide();
        }

        editRecord(record);
    }
View Full Code Here

        return currentProperty;
    }

    protected FormItem buildUnsetItem(final PropertyDefinitionSimple propertyDefinitionSimple,
        final PropertySimple propertySimple, final FormItem valueItem) {
        FormItem item;
        if (!propertyDefinitionSimple.isRequired()) {
            final CheckboxItem unsetItem = new CheckboxItem("unset-" + valueItem.getName());
            boolean unset = isUnset(propertyDefinitionSimple, propertySimple);
            unsetItem.setValue(unset);
            unsetItem.setDisabled(isReadOnly(propertyDefinitionSimple, propertySimple));
            unsetItem.setShowLabel(false);
            unsetItem.setShowTitle(false);
            unsetItem.setLabelAsTitle(false);

            unsetItem.addChangedHandler(new ChangedHandler() {
                public void onChanged(ChangedEvent changeEvent) {
                    // treat the ChangedEvent as a possible focus change, since this is a checkbox
                    handleFocusChange(valueItem, unsetItem);

                    Boolean isUnset = (Boolean) changeEvent.getValue();
                    if (isUnset != valueItem.isDisabled()) {
                        valueItem.setDisabled(isUnset);
                    }

                    if (isUnset) {
                        if (valueItem.getValue() != null) {
                            setValue(valueItem, null);
                            updatePropertySimpleValue(unsetItem, null, propertySimple, propertyDefinitionSimple);
                            firePropertyChangedEvent(propertySimple, propertyDefinitionSimple, true);
                        }
                    } else {
                        String defaultValue = propertyDefinitionSimple.getDefaultValue();
                        if (defaultValue != null) {
                            setValue(valueItem, defaultValue);
                            updatePropertySimpleValue(unsetItem, defaultValue, propertySimple, propertyDefinitionSimple);
                            boolean isValid = valueItem.validate();
                            firePropertyChangedEvent(propertySimple, propertyDefinitionSimple, isValid);
                        }

                        valueItem.focusInItem();
                    }

                    valueItem.redraw();
                }
            });

            valueItem.addChangedHandler(new ChangedHandler() {
                public void onChanged(ChangedEvent changedEvent) {
                    // If new value is null, select the unset checkbox; otherwise, deselect it.
                    Object value = changedEvent.getValue();
                    boolean isUnset = (value == null);
                    unsetItem.setValue(isUnset);
                }
            });

            // (Smartgwt 3.0) Certain FormItems, like SelectItem, generate a Blur event when we don't want them to.
            // For example, expanding the SelectItem drop down (via click) generates a Blur event (which makes no
            // sense to me since the user is obviously not leaving the widget, it should still be in focus imo). Anyway,
            // to get around this behavior and to be able to unset config properties that a user has left as null values
            // when changing focus, we avoid BlurHandler and instead use FocusHandlers and a DIY blur handling
            // approach.

            valueItem.addFocusHandler(new FocusHandler() {
                public void onFocus(FocusEvent event) {
                    handleFocusChange(valueItem, unsetItem);
                }
            });

            item = unsetItem;
        } else {
            item = new SpacerItem();
            item.setShowTitle(false);
        }
        return item;
    }
View Full Code Here

                }

                public void onSuccess(List<MeasurementDataTrait> result) {
                    for (MeasurementDataTrait trait : result) {
                        String formItemId = buildFormItemIdFromTraitDisplayName(trait.getName());
                        FormItem item = getItem(formItemId);
                        if (item != null) {
                            setValue(formItemId, trait.getValue());
                        }
                    }
                    markForRedraw();
View Full Code Here

        formItems.add(keyItem);

        boolean modifiable = this.resourceComposite.getResourcePermission().isInventory();

        // Name
        final FormItem nameItem = (modifiable) ? new EditableFormItem() : new StaticTextItem();
        nameItem.setName("name");

        nameItem.setTitle(MSG.view_summaryOverviewForm_field_name());
        nameItem.setValue(resource.getName());
        nameItem.setAttribute(OUTPUT_AS_HTML_ATTRIBUTE, true);
        if (nameItem instanceof EditableFormItem) {
            EditableFormItem togglableNameItem = (EditableFormItem) nameItem;
            togglableNameItem.setValidators(notEmptyOrNullValidator);
            togglableNameItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    final String newName = newValue.toString();
                    final String oldName = resource.getName();
                    if (newName.equals(oldName)) {
                        return;
                    }
                    resource.setName(newName);
                    OverviewForm.this.resourceService.updateResource(resource, new AsyncCallback<Void>() {
                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError(
                                MSG.view_summaryOverviewForm_error_nameChangeFailure(String.valueOf(resource.getId()),
                                    oldName, newName), caught);
                            // We failed to update it on the Server, so change back the Resource and the form item to
                            // the original value.
                            resource.setName(oldName);
                            nameItem.setValue(oldName);
                        }

                        public void onSuccess(Void result) {
                            titleBar.displayResourceName(newName);
                            CoreGUI.getMessageCenter().notify(
                                new Message(MSG.view_summaryOverviewForm_message_nameChangeSuccess(
                                    String.valueOf(resource.getId()), oldName, newName), Message.Severity.Info));
                        }
                    });
                }
            });
        }
        formItems.add(nameItem);

        // Description
        final FormItem descriptionItem = (modifiable) ? new EditableFormItem() : new StaticTextItem();
        descriptionItem.setName("description");
        descriptionItem.setTitle(MSG.common_title_description());
        descriptionItem.setValue(resource.getDescription());
        descriptionItem.setAttribute(OUTPUT_AS_HTML_ATTRIBUTE, true);
        if (descriptionItem instanceof EditableFormItem) {
            EditableFormItem togglableDescriptionItem = (EditableFormItem) descriptionItem;
            togglableDescriptionItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    final String newDescription = newValue != null ? newValue.toString() : "";
                    final String oldDescription = resource.getDescription();
                    if (newDescription.equals(oldDescription)) {
                        return;
                    }
                    resource.setDescription(newDescription);
                    OverviewForm.this.resourceService.updateResource(resource, new AsyncCallback<Void>() {
                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError(
                                MSG.view_summaryOverviewForm_error_descriptionChangeFailure(
                                    String.valueOf(resource.getId()), oldDescription, newDescription), caught);
                            // We failed to update it on the Server, so change back the Resource and the form item to
                            // the original value.
                            resource.setDescription(oldDescription);
                            descriptionItem.setValue(oldDescription);
                        }

                        public void onSuccess(Void result) {
                            CoreGUI.getMessageCenter().notify(
                                new Message(MSG.view_summaryOverviewForm_message_nameChangeSuccess(
                                    String.valueOf(resource.getId()), oldDescription, newDescription),
                                    Message.Severity.Info));
                        }
                    });
                }
            });
        }
        formItems.add(descriptionItem);

        // Location
        final FormItem locationItem = (modifiable) ? new EditableFormItem() : new StaticTextItem();
        locationItem.setName("location");
        locationItem.setTitle(MSG.view_summaryOverviewForm_field_location());
        locationItem.setValue(resource.getLocation());
        locationItem.setAttribute(OUTPUT_AS_HTML_ATTRIBUTE, true);
        if (locationItem instanceof EditableFormItem) {
            EditableFormItem togglableLocationItem = (EditableFormItem) locationItem;
            togglableLocationItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    final String newLocation = newValue != null ? newValue.toString() : "";
                    final String oldLocation = resource.getLocation();
                    if (newLocation.equals(oldLocation)) {
                        return;
                    }
                    resource.setLocation(newLocation);
                    OverviewForm.this.resourceService.updateResource(resource, new AsyncCallback<Void>() {
                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError(
                                MSG.view_summaryOverviewForm_error_locationChangeFailure(
                                    String.valueOf(resource.getId()), oldLocation, newLocation), caught);
                            // We failed to update it on the Server, so change back the Resource and the form item to
                            // the original value.
                            resource.setLocation(oldLocation);
                            locationItem.setValue(oldLocation);
                        }

                        public void onSuccess(Void result) {
                            CoreGUI.getMessageCenter()
                                .notify(
View Full Code Here

                    executionModeForm.setValue(FIELD_EXECUTION_MODE, EXECUTION_ORDER_SEQUENTIAL);
                    memberExecutionOrderer.setRecords(resourceRecords);
                    memberExecutionOrderer.show();

                    FormItem haltOnFailureItem = executionModeForm
                        .getField(GroupOperationScheduleDataSource.Field.HALT_ON_FAILURE);
                    Object haltOnFailure = getForm().getValue(GroupOperationScheduleDataSource.Field.HALT_ON_FAILURE);
                    haltOnFailureItem.setValue(haltOnFailure);
                    haltOnFailureItem.show();

                    GroupOperationScheduleDetailsView.super.editExistingRecord(record);
                }
            });
        } else {
            this.executionModeForm.setValue(FIELD_EXECUTION_MODE, EXECUTION_ORDER_PARALLEL);

            Object haltOnFailure = getForm().getValue(GroupOperationScheduleDataSource.Field.HALT_ON_FAILURE);
            FormItem haltOnFailureItem = this.executionModeForm
                .getField(GroupOperationScheduleDataSource.Field.HALT_ON_FAILURE);
            haltOnFailureItem.setValue(haltOnFailure);

            super.editExistingRecord(record);
        }

    }
View Full Code Here

        boolean canEdit = (!isDynaGroup && isEditable && hasInventoryPermission);

        StringLengthValidator notEmptyOrNullValidator = new StringLengthValidator(1, null, false);
        StringLengthValidator notNullValidator = new StringLengthValidator(null, null, false);

        final FormItem nameItem;
        if (canEdit) {
            final EditableFormItem togglableNameItem = new EditableFormItem();
            togglableNameItem.setValidators(notEmptyOrNullValidator);
            togglableNameItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    final String newName = newValue.toString();
                    final String oldName = group.getName();
                    if (newName.equals(oldName)) {
                        return;
                    }
                    group.setName(newName);
                    GeneralProperties.this.resourceGroupService.updateResourceGroup(group, false,
                        new AsyncCallback<Void>() {
                            public void onFailure(Throwable caught) {
                                CoreGUI.getErrorHandler().handleError(
                                    MSG.view_group_summary_nameUpdateFailure(String.valueOf(group.getId()), oldName,
                                        newName), caught);
                                // We failed to update it on the Server, so change back the ResourceGroup and the form item
                                // to the original value.
                                group.setName(oldName);
                                togglableNameItem.setValue(oldName);
                            }

                            public void onSuccess(Void result) {
                                titleBar.displayGroupName(newName);

                                CoreGUI.getMessageCenter().notify(
                                    new Message(MSG.view_group_summary_nameUpdateSuccessful(
                                        String.valueOf(group.getId()), oldName, newName), Message.Severity.Info));
                            }
                        });
                }
            });
            nameItem = togglableNameItem;
        } else {
            StaticTextItem staticNameItem = new StaticTextItem();
            staticNameItem.setEscapeHTML(true);
            nameItem = staticNameItem;
        }

        nameItem.setName("name");
        nameItem.setTitle(MSG.common_title_name());
        nameItem.setValue(group.getName());

        formItems.add(nameItem);

        StaticTextItem typeItem = new StaticTextItem("memberType", MSG.view_group_summary_memberType());
        ResourceType type = group.getResourceType();
        if (type != null) {
            // compatible group
            typeItem.setTooltip(MSG.common_title_plugin() + ": " + type.getPlugin() + "\n<br>"
                + MSG.common_title_type() + ": " + type.getName());
            typeItem.setValue(type.getName() + " (" + type.getPlugin() + ")");
        } else {
            // mixed group
            typeItem.setValue("<i>" + MSG.view_group_summary_mixed() + "</i>");
        }
        formItems.add(typeItem);

        StaticTextItem countItem = new StaticTextItem("memberCount", MSG.view_group_summary_memberCount());
        long memberCount = this.groupComposite.getImplicitCount();
        countItem.setValue(memberCount);
        formItems.add(countItem);

        final FormItem descriptionItem;
        String value;
        if (canEdit) {
            final EditableFormItem togglableDescriptionItem = new EditableFormItem();
            togglableDescriptionItem.setValidators(notNullValidator);
            togglableDescriptionItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    final String newDescription = newValue.toString();
                    final String oldDescription = group.getDescription();
                    if (newDescription.equals(oldDescription)) {
                        return;
                    }
                    group.setDescription(newDescription);
                    GeneralProperties.this.resourceGroupService.updateResourceGroup(group, false,
                        new AsyncCallback<Void>() {
                            public void onFailure(Throwable caught) {
                                CoreGUI.getErrorHandler().handleError(
                                    MSG.view_group_summary_descUpdateFailure(String.valueOf(group.getId())), caught);
                                // We failed to update it on the Server, so change back the ResourceGroup and the form item
                                // to the original value.
                                group.setDescription(oldDescription);
                                togglableDescriptionItem.setValue(oldDescription);
                            }

                            public void onSuccess(Void result) {
                                CoreGUI.getMessageCenter().notify(
                                    new Message(MSG.view_group_summary_descUpdateSuccessful(), Message.Severity.Info));
                            }
                        });
                }
            });
            descriptionItem = togglableDescriptionItem;
            value = group.getDescription();
        } else {
            descriptionItem = new StaticTextItem();
            value = StringUtility.escapeHtml(group.getDescription());
        }

        descriptionItem.setName("description");
        descriptionItem.setTitle(MSG.common_title_description());
        descriptionItem.setValue(value);

        formItems.add(descriptionItem);

        StaticTextItem dynamicItem = new StaticTextItem("dynamic", MSG.view_group_summary_dynamic());
        dynamicItem.setValue(isDynaGroup ? MSG.common_val_yes() : MSG.common_val_no());
        formItems.add(dynamicItem);

        FormItem recursiveItem;
        if (canEdit) {
            CheckboxEditableFormItem editableRecursiveItem = new CheckboxEditableFormItem("recursive",
                MSG.view_group_summary_recursive());
            editableRecursiveItem.setValueEditedHandler(new ValueEditedHandler() {
                public void editedValue(Object newValue) {
                    boolean isRecursive = ((newValue != null) && (Boolean) newValue);
                    resourceGroupService.setRecursive(group.getId(), isRecursive, new AsyncCallback<Void>() {
                        public void onSuccess(Void result) {
                            CoreGUI.getMessageCenter().notify(
                                new Message(MSG.view_group_detail_recursiveChange(group.getName())));
                        }

                        public void onFailure(Throwable caught) {
                            CoreGUI.getErrorHandler().handleError(
                                MSG.view_group_detail_failRecursiveChange(String.valueOf(group.getName())));
                        }
                    });
                }
            });
            recursiveItem = editableRecursiveItem;
        } else {
            recursiveItem = new StaticTextItem("recursive", MSG.view_group_summary_recursive());
        }
        recursiveItem.setValue((group.isRecursive()) ? MSG.common_val_yes() : MSG.common_val_no());
        formItems.add(recursiveItem);

        StaticTextItem createdItem = new StaticTextItem("created", MSG.common_title_dateCreated());
        createdItem.setValue(TimestampCellFormatter.format(group.getCtime()));
        formItems.add(createdItem);
View Full Code Here

            getForm().rememberValues();
        }
    }

    private void initNameField() {
        FormItem nameField = getForm().getField(Field.OPERATION_NAME);
        nameField.setValue(operationIdToNameMap.get(operationDefinitionId));
        handleOperationNameChange(OperationNameChangeContext.INIT);
    }
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.fields.FormItem

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.