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");
        TextBoxItem moduleItem = new TextBoxItem("module", "Module");
        ComboBoxItem txItem = new ComboBoxItem("transactionSupport", "TX");
        txItem.setDefaultToFirstOption(true);
        txItem.setValueMap(new String[]{"NoTransaction", "LocalTransaction", "XATransaction"});


        form.setFields(nameItem, archiveItem, moduleItem, txItem);

        final FormHelpPanel helpPanel = new FormHelpPanel(
View Full Code Here


                                List<ModelNode> allowed = attrValue.get("allowed").asList();
                                Set<String> allowedValues = new HashSet<String>(allowed.size());
                                for(ModelNode value : allowed)
                                    allowedValues.add(value.asString());

                                ComboBoxItem combo = new ComboBoxItem(attr.getName(), label);
                                combo.setValueMap(allowedValues);
                            }
                            else
                            {
                                TextBoxItem tb = new TextBoxItem(attr.getName(), label);
                                tb.setRequired(required);
View Full Code Here

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

        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

        List<String> groups = new ArrayList<String>(serverGroups.size());
        for(ServerGroupRecord rec : serverGroups)
            groups.add(rec.getGroupName());

        groupItem = new ComboBoxItem("group", Console.CONSTANTS.common_label_serverGroup());
        groupItem.setDefaultToFirstOption(true);
        groupItem.setValueMap(groups);

        form.setFields(nameItem, groupItem, portOffset, startedItem);
View Full Code Here

        final Form<SocketBinding> form = new Form(SocketBinding.class);

        TextBoxItem nameItem = new TextBoxItem("name", "Name");
        NumberBoxItem portItem = new NumberBoxItem("port", "Port");
        final ComboBoxItem groupItem = new ComboBoxItem("group", "Binding Group");

        groupItem.setValueMap(bindingGroups);


        int i=0;
        for(String group : bindingGroups)
        {
            if(group.equals("standard-sockets"))
                break;
            i++;
        }
        groupItem.selectItem(i);

        form.setFields(nameItem, portItem, groupItem);

        DialogueOptions options = new DialogueOptions(
View Full Code Here

        CheckBoxItem publicAddress = new CheckBoxItem("publicAddress", "Public Address");
        CheckBoxItem siteLocalAddress = new CheckBoxItem("siteLocal", "Site Local Address");
        CheckBoxItem linkLocalAddress = new CheckBoxItem("linkLocal", "Link Local Address");

        anyAddress = new ComboBoxItem("addressWildcard", "Address Wildcard") {
            {
                isRequired = false;
            }
        };
View Full Code Here

        /*TextBoxItem urlItem = new TextBoxItem("connectionUrl", "Connection URL");
        CheckBoxItem jtaItem = new CheckBoxItem("jta", "Use JTA?");
        CheckBoxItem ccmItem = new CheckBoxItem("ccm", "Use CCM?");*/

        ComboBoxItem tx = new ComboBoxItem("transactionIsolation", "Transaction Isolation");
        tx.setValueMap(new String[]{
                "TRANSACTION_NONE",
                "TRANSACTION_READ_UNCOMMITTED",
                "TRANSACTION_READ_COMMITTED",
                "TRANSACTION_REPEATABLE_READ",
                "TRANSACTION_SERIALIZABLE"
View Full Code Here

        final Form<WorkmanagerPool> form = new Form(WorkmanagerPool.class);

        TextBoxItem nameField = new TextBoxItem("name", Console.CONSTANTS.common_label_name());

        final ComboBoxItem type = new ComboBoxItem("type", "Type");
        type.setDefaultToFirstOption(true);
        type.setValueMap(new String[] {"long-running"});

        NumberBoxItem maxThreads = new NumberBoxItem("maxThreadsCount", "Max Threads");
        NumberBoxItem maxThreadsPerCPU = new NumberBoxItem("maxThreadsPerCPU", "Max Threads/CPU");
        NumberBoxItem queueLength = new NumberBoxItem("queueLengthCount", "Queue Length");
        NumberBoxItem queueLengthPerCPU = new NumberBoxItem("queueLengthPerCPU", "Queue Length/CPU");

        maxThreads.setValue(10);
        maxThreadsPerCPU.setValue(20);
        queueLength.setValue(10);
        queueLengthPerCPU.setValue(20);

        form.setFields(nameField, type, maxThreads, maxThreadsPerCPU, queueLength, queueLengthPerCPU);

        DialogueOptions options = new DialogueOptions(

                // save
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        WorkmanagerPool pool = form.getUpdatedEntity();
                        pool.setShortRunning(type.getValue().equals("short-running"));

                        FormValidation validation = form.validate();
                        if(validation.hasErrors())
                            return;
View Full Code Here

        TextBoxItem nameItem = new TextBoxItem("name", "Name");

        TextBoxItem inetAddress = new TextBoxItem("inetAddress", "Inet Address", false);

        final ComboBoxItem anyAddress = new ComboBoxItem("addressWildcard", "Address Wildcard") {
            {
                isRequired = false;
            }
        };

        anyAddress.setDefaultToFirstOption(true);
        anyAddress.setValueMap(new String[]{"", Interface.ANY_ADDRESS, Interface.ANY_IP4, Interface.ANY_IP6});

        form.setFields(nameItem, inetAddress, anyAddress);

        DialogueOptions options = new DialogueOptions(
View Full Code Here

            this.values = values;
        }

        @Override
        public ObservableFormItem[] makeFormItem(PropertyBinding propBinding, FormItemObserver... observers) {
            ComboBoxItem comboBoxItem = new ComboBoxItem(propBinding.getJavaName(), propBinding.getLabel());
            comboBoxItem.setRequired(propBinding.isRequired());
           
            if (values == null) {
                comboBoxItem.setValueMap(propBinding.getAcceptedValues());
            } else {
                comboBoxItem.setValueMap(values);
            }
           
            return new ObservableFormItem[] {new ObservableFormItem(propBinding, comboBoxItem, observers)};
        }
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.