Examples of ComboBoxItem


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

    scaleItem.setValueMap(availableScales.toArray(new String[availableScales.size()]));
  }

  private void init() {
    DynamicForm form = new DynamicForm();
    scaleItem = new ComboBoxItem();
    scaleItem.setTitle(I18nProvider.getToolbar().scaleSelect());
    scaleItem.setValidators(new ScaleValidator());
    scaleItem.setValidateOnChange(true);
    scaleItem.addKeyPressHandler(this);
    scaleItem.addChangedHandler(this);
View Full Code Here

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

    setHeight(28);
    setWidth(200);

    // Build a small form with a select item for locales:
    DynamicForm form = new DynamicForm();
    ComboBoxItem localeItem = new ComboBoxItem();
    localeItem.setValueMap(locales.values().toArray(new String[locales.size()]));
    localeItem.setTitle(I18nProvider.getGlobal().localeTitle());

    // Show the current locale value in the select item:
    String currentLocale = LocaleInfo.getCurrentLocale().getLocaleName();
    localeItem.setValue(locales.get(currentLocale));

    // Add the changed handler, and build the widget:
    localeItem.addChangedHandler(this);
    form.setFields(localeItem);
    addChild(form);
  }
View Full Code Here

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

            setBodyDefaults(bodyDefaults);

            final DynamicForm form = new DynamicForm();
            addItem(form);

            tagInputItem = new ComboBoxItem("tag");
            tagInputItem.setShowTitle(false);
            tagInputItem.setHideEmptyPickList(true);
            tagInputItem.setValueField("tag");
            tagInputItem.setDisplayField("tag");
            tagInputItem.setType("comboBox");
View Full Code Here

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

                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 {
View Full Code Here

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

            for (PropertyDefinitionEnumeration option : enumeratedValues) {
                valueOptions.put(option.getValue(), option.getName());
            }

            if (propDef.getAllowCustomEnumeratedValue()) {
                editorItem = new ComboBoxItem();
                ((ComboBoxItem) editorItem).setAddUnknownValues(true);
            } else {
                if (valueOptions.size() > 5) {
                    editorItem = new SortedSelectItem();
                } else {
View Full Code Here

Examples of org.jboss.as.console.client.widgets.forms.ComboBoxItem

        detailPanel.add(detailToolStrip);
       
        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());
        TextItem typeItem = new TextItem("type", Console.CONSTANTS.subsys_logging_type());

        ComboBoxItem logLevelItem = new ComboBoxItem("level", Console.CONSTANTS.subsys_logging_logLevel());
        logLevelItem.setValueMap(LogLevel.STRINGS);
       
        StatusItem flushItem = new StatusItem("autoflush", Console.CONSTANTS.subsys_logging_autoFlush());

        TextItem formatterItem = new TextItem("formatter", Console.CONSTANTS.subsys_logging_formatter());
        TextItem encodingItem = new TextItem("encoding", Console.CONSTANTS.subsys_logging_encoding());
View Full Code Here

Examples of org.jboss.as.console.client.widgets.forms.ComboBoxItem

        detailPanel.add(detailToolStrip);

        TextItem nameItem = new TextItem("name", Console.CONSTANTS.common_label_name());

        ComboBoxItem logLevelItem = new ComboBoxItem("level", Console.CONSTANTS.subsys_logging_logLevel());
        logLevelItem.setValueMap(LogLevel.STRINGS);

        ListItem handlersItem = new ListItem("handlers", Console.CONSTANTS.subsys_logging_handlers(), true);

        form.setFields(nameItem, logLevelItem, handlersItem);
View Full Code Here

Examples of org.jboss.as.console.client.widgets.forms.ComboBoxItem

    }

    private void createContents(DockLayoutPanel content) {
        form = new Form<CommonSettings>(CommonSettings.class);

        ComboBoxItem localeItem = new ComboBoxItem("locale", "Locale");
        localeItem.setValueMap(new String[] {"en", "de"});
        localeItem.setDefaultToFirstOption(true);

        form.setFields(localeItem);

        Widget formWidget = form.asWidget();
        formWidget.getElement().setAttribute("style", "margin:15px");
View Full Code Here

Examples of org.jboss.as.console.client.widgets.forms.ComboBoxItem

        // ------------------------------------------------------

        final NumberBoxItem portOffset = new NumberBoxItem("portOffset", Console.CONSTANTS.common_label_portOffset());

        socketItem = new ComboBoxItem("socketBinding", Console.CONSTANTS.common_label_socketBinding())
        {
            @Override
            public boolean validate(String value) {
                boolean parentValid = super.validate(value);
                //boolean portDefined = !portOffset.isModified();
View Full Code Here

Examples of org.jboss.as.console.client.widgets.forms.ComboBoxItem

            public String getErrMessage() {
                return Console.MESSAGES.common_validation_notEmptyNoSpace();
            }
        };

        final ComboBoxItem basedOnSelection = new ComboBoxItem("based-on", Console.CONSTANTS.common_label_basedOn());

        String[] exists = new String[existing.size()];
        int i=0;
        for(ServerGroupRecord rec : existing)
        {
            exists[i] = rec.getGroupName();
            i++;
        }

        basedOnSelection.setDefaultToFirstOption(true);
        basedOnSelection.setValueMap(exists);

        form.setFields(nameField, basedOnSelection);

        DialogueOptions options = new DialogueOptions(

                // save
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        // merge base
                        ServerGroupRecord newGroup = form.getUpdatedEntity();

                        FormValidation validation = form.validate();
                        if(validation.hasErrors())
                            return;

                        ServerGroupRecord base = null;
                        for(ServerGroupRecord rec : existing)
                        {
                            if(rec.getGroupName().equals(basedOnSelection.getValue()))
                            {
                                base = rec;
                                break;
                            }
                        }
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.