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

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


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

        layout.add(new HTML("<h2>Connection Definition Step1/2</h2>"));

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

        TextBoxItem jndiName = new JndiNameItem("jndiName", "JNDI Name");
        TextBoxItem classItem = new TextBoxItem("connectionClass", "Connection Class");

        form.setFields(jndiName, classItem);

        final FormHelpPanel helpPanel = new FormHelpPanel(
                new FormHelpPanel.AddressCallback() {
                    @Override
                    public ModelNode getAddress() {
                        ModelNode address = Baseadress.get();
                        address.add("subsystem", "resource-adapters");
                        address.add("resource-adapter", "*");
                        address.add("connection-definitions", "*");
                        return address;
                    }
                }, form
        );
        layout.add(helpPanel.asWidget());

        layout.add(form.asWidget());

        DialogueOptions options = new DialogueOptions(

                // save

                new ClickHandler() {
                    @Override
                    public void onClick(ClickEvent event) {
                        FormValidation validation = form.validate();
                        if(!validation.hasErrors())
                        {
                            ConnectionDefinition connectionDef = form.getUpdatedEntity();
                            connectionDef.setApplication(true); // JBPAPP-9977: reasonable default
                            parent.onCompleteStep1(connectionDef);
                        }
                    }
                },
View Full Code Here


    private DataSourcePresenter presenter;
    private ToolButton disableBtn;

    public DataSourceDetails(DataSourcePresenter presenter) {
        this.presenter = presenter;
        form = new Form(DataSource.class);
        form.setNumColumns(2);

        /*form.addEditListener(new EditListener<DataSource>() {
            @Override
            public void editingBean(DataSource bean) {
View Full Code Here

        return Console.CONSTANTS.subsys_deploymentscanner_scanners();
    }

    @Override
    protected FormAdapter<DeploymentScanner> makeAddEntityForm() {
        Form<DeploymentScanner> form = new Form(DeploymentScanner.class);
        form.setNumColumns(1);
        form.setFields(formMetaData.findAttribute("name").getFormItemForAdd(),
                       formMetaData.findAttribute("path").getFormItemForAdd(),
                       formMetaData.findAttribute("relativeTo").getFormItemForAdd(),
                       formMetaData.findAttribute("scanInterval").getFormItemForAdd(),
                       formMetaData.findAttribute("deploymentTimeout").getFormItemForAdd(),
                       formMetaData.findAttribute("enabled").getFormItemForAdd());
View Full Code Here

    }

    Widget asWidget() {
        VerticalPanel layout = new VerticalPanel();

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

        FormToolStrip<Topic> formTools = new FormToolStrip<Topic>(
                form,
                new FormToolStrip.FormCallback<Topic>() {
View Full Code Here

        super(type, propertyMetaData, dispatcher);
    }

    @Override
    protected FormAdapter<T> makeAddEntityForm() {
        Form<T> form = new Form(beanType);
        form.setNumColumns(1);
        form.setFields(getFormMetaData().findAttribute("name").getFormItemForAdd(),
                       getFormMetaData().findAttribute("cacheContainer").getFormItemForAdd(this),
                       getFormMetaData().findAttribute("clusteredCacheMode").getFormItemForAdd());
        return form;
    }
View Full Code Here

        return Console.CONSTANTS.subsys_logging_periodicRotatingFileHandlers();
    }

    @Override
    protected FormAdapter<PeriodicRotatingFileHandler> makeAddEntityForm() {
        Form<PeriodicRotatingFileHandler> form = new Form(type);
        form.setNumColumns(1);
        form.setFields(formMetaData.findAttribute("name").getFormItemForAdd(),
                       levelItemForAdd,
                       formMetaData.findAttribute("filePath").getFormItemForAdd(),
                       formMetaData.findAttribute("fileRelativeTo").getFormItemForAdd(),
//                       formMetaData.findAttribute("suffix").getFormItemForAdd());
                       new FormItem[]{(FormItem<String>)suffixAdd});
View Full Code Here

        return form;
    }
   
    @Override
    protected FormAdapter<PeriodicRotatingFileHandler> makeEditEntityDetailsForm() {
        Form<PeriodicRotatingFileHandler> form = new Form(type);
        form.setNumColumns(2);
        FormMetaData attributes = getFormMetaData();

        // add base items to form
        FormItem[][] items = new FormItem[attributes.getBaseAttributes().size()][];
        int i=0;
        for (PropertyBinding attrib : attributes.getBaseAttributes()) {
          if(attrib.getDetypedName().equals("suffix")){
            items[i++] = new FormItem[]{(FormItem<String>)suffixEdit};
           continue;
          }
            items[i++] = attrib.getFormItemForEdit(this);
        }
        form.setFields(items);

        // add grouped items to form
        for (String subgroup : attributes.getGroupNames()) {
            FormItem[][] groupItems = new FormItem[attributes.getGroupedAttribtes(subgroup).size()][];
            int j=0;
            for (PropertyBinding attrib : attributes.getGroupedAttribtes(subgroup)) {
                groupItems[j++] = attrib.getFormItemForEdit(this);
            }
            form.setFieldsInGroup(subgroup, groupItems);
        }

        return form;
    }
View Full Code Here

    Widget asWidget() {

        VerticalPanel layout = new VerticalPanel();

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

        FormToolStrip<Queue> formTools = new FormToolStrip<Queue>(
                form,
                new FormToolStrip.FormCallback<Queue>() {
View Full Code Here

        return formsMap;
    }

    private FormAdapter<T> makeForm(List<PropertyBinding> bindings) {

        Form<T> form = new Form(beanType);

        if (bindings.size() < 3) {
            form.setNumColumns(1);
        } else {
            form.setNumColumns(2);
        }

        List<PropertyBinding> baseBindings = formMetaData.getBaseAttributes();
        // FormItem[][] items = new FormItem[baseBindings.size()][];
        List<FormItem[]> items = new ArrayList<FormItem[]>();
        // for (PropertyBinding propBinding : baseBindings) {
        for (PropertyBinding propBinding : bindings) {
            if (baseBindings.contains(propBinding)) {
                items.add(propBinding.getFormItemForEdit(observers));
            }
        }
        form.setFields(items.toArray(new FormItem[items.size()][]));

        for (String subgroup : formMetaData.getGroupNames()) {
            List<PropertyBinding> groupBindings = formMetaData.getGroupedAttribtes(subgroup);
            // FormItem[][] groupItems = new FormItem[groupBindings.size()][];
            List<FormItem[]> groupItems = new ArrayList<FormItem[]>();
            // for (PropertyBinding propBinding : groupBindings) {
            for (PropertyBinding propBinding : bindings) {
                if (groupBindings.contains(propBinding)) {
                    groupItems.add(propBinding.getFormItemForEdit(observers));
                }
            }
            if (groupItems.size() > 0) {
                form.setFieldsInGroup(subgroup, new DisclosureGroupRenderer(), groupItems.toArray(new FormItem[groupItems.size()][]));
            }
        }

        return form;
    }
View Full Code Here

        return "Blocking Bounded Queue Thread Pools";
    }

    @Override
    protected FormAdapter<BlockingBoundedQueueThreadPool> makeAddEntityForm() {
        Form<BlockingBoundedQueueThreadPool> form = new Form(BlockingBoundedQueueThreadPool.class);
        form.setNumColumns(1);
        form.setFields(formMetaData.findAttribute("name").getFormItemForAdd(),
                       formMetaData.findAttribute("queueLength").getFormItemForAdd(),
                       formMetaData.findAttribute("maxThreads").getFormItemForAdd(),
                       formMetaData.findAttribute("coreThreads").getFormItemForAdd(),
                       formMetaData.findAttribute("keepaliveTime").getFormItemForAdd(),
                       formMetaData.findAttribute("keepaliveTimeUnit").getFormItemForAdd(),
View Full Code Here

TOP

Related Classes of org.jboss.ballroom.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.