Package org.jboss.ballroom.client.widgets.forms

Examples of org.jboss.ballroom.client.widgets.forms.ComboBoxItem


        // ----

        TextItem nameItem = new TextItem("name", "Name");
        TextBoxItem archiveItem = new TextBoxItem("archive", "Archive");
        ComboBoxItem txItem = new ComboBoxItem("transactionSupport", "TX");
        txItem.setDefaultToFirstOption(true);
        txItem.setValueMap(new String[]{"NoTransaction", "LocalTransaction", "XATransaction"});


        form.setFields(nameItem, archiveItem, txItem);

        final FormHelpPanel helpPanel = new FormHelpPanel(
View Full Code Here


            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

        final TextItem nameField = new TextItem("groupName", Console.CONSTANTS.common_label_name());
        //jvmField = new ComboBoxItem("jvm", "Virtual Machine");
        //jvmField.setValueMap(new String[] {"default"}); // TODO: https://issues.jboss.org/browse/JBAS-9156

        socketBindingItem = new ComboBoxItem("socketBinding", Console.CONSTANTS.common_label_socketBinding());
        socketBindingItem.setDefaultToFirstOption(true);

        // TODO: https://issues.jboss.org/browse/AS7-663
        //profileItem = new ComboBoxItem("profileName", "Profile");
        TextItem profileItem = new TextItem("profileName", Console.CONSTANTS.common_label_profile());
View Full Code Here

        setNumColumns(1);
    }
   
    @Override
    public Widget asWidget() {
        this.availableHandlersItem = new ComboBoxItem("handlerToAssign", Console.CONSTANTS.subsys_logging_handlers());
        this.availableHandlersItem.setRequired(true);
        this.availableHandlersItem.setDefaultToFirstOption(true);
        setFields(availableHandlersItem);
        return super.asWidget();
    }
View Full Code Here

        setNumColumns(1);
    }
   
    @Override
    public Widget asWidget() {
        handlersItem = new ComboBoxItem("handlerToUnassign", Console.CONSTANTS.subsys_logging_handlers());
        handlersItem.setRequired(true);
        handlersItem.setDefaultToFirstOption(true);
        setFields(handlersItem);
        return super.asWidget();
    }
View Full Code Here

        // TODO: https://issues.jboss.org/browse/AS7-1346
        //TextBoxItem nameItem = new TextBoxItem("name", "Name");

        TextBoxItem jndiItem = new TextBoxItem("jndiName", "JNDI");
        TextBoxItem classItem = new TextBoxItem("connectionClass", "Connection Class");
        ComboBoxItem txItem = new ComboBoxItem("transactionSupport", "TX");
        txItem.setDefaultToFirstOption(true);
        txItem.setValueMap(new String[]{"NoTransaction", "LocalTransaction", "XATransaction"});

        form.setFields(archiveItem, jndiItem, classItem, txItem);

        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
View Full Code Here

            this.values = values;
        }
       
        @Override
        public FormItem makeFormItem(String beanPropName, String label, boolean isRequired) {
            ComboBoxItem comboBoxItem = new ComboBoxItem(beanPropName, label);
            comboBoxItem.setRequired(isRequired);
            comboBoxItem.setValueMap(values);
            return comboBoxItem;
        }
View Full Code Here

   
    @Override
    public Form<LoggerConfig> makeAddEntityForm() {
        TextBoxItem nameItem = new TextBoxItem("name", Console.CONSTANTS.common_label_name());

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

        Form<LoggerConfig> form = new Form(this.conversionType);
        form.setNumColumns(1);
        form.setFields(nameItem, logLevelItem);
        return form;
View Full Code Here

   
    @Override
    public Form<LoggerConfig> makeEditForm() {
        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<LoggerConfig> form = new Form(this.conversionType);
        form.setNumColumns(1);
View Full Code Here

        this.bridge = bridge;
    }
   
    @Override
    public FormAdapter<LoggingHandler> makeAddEntityForm() {
        ComboBoxItem handlerTypeItem = new ComboBoxItem("type", Console.CONSTANTS.subsys_logging_type());
        handlerTypeItem.setValueMap(HandlerType.getAllDisplayNames());
        handlerTypeItem.setValue("periodic-rotating-file-handler");

        FormItem levelItem = LEVEL.getItemForAdd();
        levelItem.setValue("INFO");
       
        Form<LoggingHandler> form = new Form(this.conversionType);
View Full Code Here

TOP

Related Classes of org.jboss.ballroom.client.widgets.forms.ComboBoxItem

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.