Package com.smartgwt.client.widgets.form

Examples of com.smartgwt.client.widgets.form.DynamicForm.validate()


    IButton addBtn = new IButton(messages.favouritesControllerAddAdd());
    addBtn.setIcon(BTN_ADD_IMG);
    addBtn.setAutoFit(true);
    addBtn.addClickHandler(new ClickHandler() {
      public void onClick(ClickEvent event) {
        if (form.validate()) {
          addWindow.hide();
          fav.setName(nameItem.getValueAsString());
          fav.setShared(sharedItem.getValueAsBoolean());
          FavouritesCommService.saveSearchFavourite(fav, new DataCallback<SearchFavourite>() {
            public void execute(SearchFavourite result) {
View Full Code Here


            // and another one if there is just one group
            List<PropertyDefinition> propertyDefinitions = new ArrayList<PropertyDefinition>(
                configurationDefinition.getNonGroupedProperties());
            if (!propertyDefinitions.isEmpty()) {
                DynamicForm form = buildPropertiesForm(propertyDefinitions, configuration);
                form.validate();
                layout.addMember(form);
            }
            if (groupDefinitions.size() == 1) {
                propertyDefinitions = new ArrayList<PropertyDefinition>(
                    configurationDefinition.getPropertiesInGroup(groupDefinitions.get(0).getName()));
View Full Code Here

                propertyDefinitions = new ArrayList<PropertyDefinition>(
                    configurationDefinition.getPropertiesInGroup(groupDefinitions.get(0).getName()));
                DynamicForm groupForm = buildPropertiesForm(propertyDefinitions, configuration);
                groupForm.setIsGroup(true);
                groupForm.setGroupTitle(groupDefinitions.get(0).getDisplayName());
                groupForm.validate();
                layout.addMember(groupForm);
            }
        } else {
            // Two or more prop groups, so create a section stack with one section per group.
            final SectionStack sectionStack = new SectionStack();
View Full Code Here

        DynamicForm form = buildPropertiesForm(propertyDefinitions, configuration);

        // If the group contains any invalid properties, expand the section so the user can see the error icons next to
        // the invalid properties.
        if (!form.validate()) {
            section.setExpanded(true);
        }

        section.addItem(form);
        return section;
View Full Code Here

                                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());
View Full Code Here

            okButton.disable();
        }
        okButton.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                if (!mapReadOnly) {
                    if (!childForm.validate()) {
                        okButton.disable();
                        return;
                    }
                    if (newRow) {
                        propertyList.add(workingMap);
View Full Code Here

        IButton saveButton = new EnhancedIButton(MSG.common_button_save(), ButtonColor.BLUE);
        saveButton.setOverflow(Overflow.VISIBLE);
        saveButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                if (form.validate()) {
                    server.setAddress(addressItem.getValueAsString());
                    server.setPort(Integer.parseInt(portItem.getValueAsString()));
                    server.setSecurePort(Integer.parseInt(securePortItem.getValueAsString()));
                    server.setOperationMode(OperationMode.valueOf(operationModeItem.getValueAsString()));
                    GWTServiceLookup.getTopologyService().updateServer(server, new AsyncCallback<Void>() {
View Full Code Here

                }
            });
            IButton save = new EnhancedIButton(MSG.common_button_save(), ButtonColor.BLUE);
            save.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent clickEvent) {
                    if (form.validate()) {
                        // the form submit handler code is responsible for performing the configure and refresh as
                        // needed. This ensures that the updated configuration is used.                       
                        form.submit();

                        // the portlet does not have a handle on its container, so saving the new settings is down here
View Full Code Here

        // button setup
        IButton saveButton = new EnhancedIButton(MSG.common_button_save(), ButtonColor.BLUE);
        saveButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                if (form.validate()) {
                    saveFormCheckCannedExpr(form, dynaGroupChildrenView, false);
                }
            }
        });
View Full Code Here

        IButton recalculateButton = new EnhancedIButton(MSG.view_dynagroup_saveAndRecalculate());
        recalculateButton.setWidth(150);
        recalculateButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent clickEvent) {
                if (form.validate()) {
                    saveFormCheckCannedExpr(form, dynaGroupChildrenView, true);
                }
            }
        });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.