Package org.jboss.as.console.client.widgets.forms

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


    private ToolButton cancelBtn;
    private LoggingHandler editedHandler;
   
    public HandlerDetails(LoggingPresenter presenter) {
        this.presenter = presenter;
        form = new Form(LoggingHandler.class);
        form.setNumColumns(2);
    }
View Full Code Here


    private ToolButton cancelBtn;
    private LoggerConfig editedLogger;

    public LoggerConfigDetails(LoggingPresenter presenter) {
        this.presenter = presenter;
        form = new Form(LoggerConfig.class);
        form.setNumColumns(2);
    }
View Full Code Here

        panel.add(new ContentHeaderLabel("Messaging Provider Configuration"));

        panel.add(new ContentGroupLabel("Attributes"));

        form = new Form(MessagingProvider.class);
        form.setNumColumns(2);

        TextItem name = new TextItem("name", "Provider");
        StatusItem persistenceItem = new StatusItem("persistenceEnabled", "Persistence enabled?");
View Full Code Here

        layout.add(table);


        // -----

        form = new Form(JMSEndpoint.class);
        form.setNumColumns(2);

        TextItem name = new TextItem("name", "Name");
        TextItem jndi = new TextItem("jndiName", "JNDI");
View Full Code Here

    public Widget asWidget() {

        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

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

        TextBoxItem nameField = new TextBoxItem("groupName", Console.CONSTANTS.common_label_name())
        {
            @Override
            public boolean validate(String value) {
                boolean hasValue = super.validate(value);
                boolean hasWhitespace = value.contains(" ");
                return hasValue && !hasWhitespace;
            }

            @Override
            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;
                            }
                        }

                        newGroup.setJvm(base.getJvm());
                        newGroup.setSocketBinding(base.getSocketBinding());
                        newGroup.setProfileName(base.getProfileName());
                        newGroup.setProperties(base.getProperties());

                        presenter.createNewGroup(newGroup);

                    }
                },

                // cancel
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        presenter.closeDialoge();
                    }
                }

        );

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

        Widget formWidget = form.asWidget();

        StaticHelpPanel helpPanel = new StaticHelpPanel(
                Console.MESSAGES.commmon_description_newServerGroup()
        );
View Full Code Here

    private ToolButton editBtn;
    private DataSourcePresenter presenter;

    public XADataSourceDetails(DataSourcePresenter presenter) {
        this.presenter = presenter;
        form = new Form(XADataSource.class);
        form.setNumColumns(2);
    }
View Full Code Here

    private ToolButton editBtn;
    private DataSourcePresenter presenter;

    public DataSourceDetails(DataSourcePresenter presenter) {
        this.presenter = presenter;
        form = new Form(DataSource.class);
        form.setNumColumns(2);
    }
View Full Code Here

    Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();
        layout.setStyleName("window-content");

        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(

                // save
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {

                        FormValidation validation = form.validate();
                        if(!validation.hasErrors())
                        {
                            SocketBinding newGroup = form.getUpdatedEntity();
                            presenter.createNewSocketBinding(newGroup);
                        }
                    }
                },

                // cancel
                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        presenter.closeDialoge();
                    }
                }

        );

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

        Widget formWidget = form.asWidget();

        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
View Full Code Here

        layout.add(toolStrip);*/

        // ----


        form = new Form(JSPContainerConfiguration.class);
        form.setNumColumns(2);

        StatusItem listing = new StatusItem("listings", "Listings?");

        StatusItem disabled= new StatusItem("disabled", "Disabled?");
View Full Code Here


        // ----


        form = new Form(Queue.class);
        form.setNumColumns(2);

        TextItem name = new TextItem("name", "Name");
        TextItem jndi = new TextItem("jndiName", "JNDI");
View Full Code Here

TOP

Related Classes of org.jboss.as.console.client.widgets.forms.Form

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.