Package com.smartgwt.client.widgets.form

Examples of com.smartgwt.client.widgets.form.DynamicForm


    }

    @Override
    protected DynamicForm getAvailableFilterForm() {
        if (availableFilterForm == null) {
            availableFilterForm = new DynamicForm();
            availableFilterForm.setWidth("75%");
            final TextItem search = new TextItem(FIELD_NAME.propertyName(), MSG.common_title_search());
            availableFilterForm.setItems(search);
        }
        return availableFilterForm;
View Full Code Here


    protected boolean canEditName() {
        return true;
    }

    private DynamicForm buildEditForm() {
        editForm = new DynamicForm();
        editForm.setMargin(5);
        editForm.setAutoWidth();
        editForm.setNumCols(canEditName() ? 12 : 10);

        TextItem nameItem = null;
View Full Code Here

        });
        closeButton.setStartRow(true);
        closeButton.setEndRow(true);

        // stitch together the UI
        DynamicForm form = new DynamicForm();
        form.setWrapItemTitles(false);
        form.setAutoWidth();
        form.setAutoHeight();
        form.setCellPadding(5);
        form.setFields(this.expressionItem, this.memberOfItem, this.memberOfGroupItem, this.groupByItem,
            this.resourceItem, this.expressionTypeItem, this.pluginItem, this.resourceTypeItem, this.propertyNameItem,
            this.unsetItem, this.compareTypeItem, this.valueItem, addButton, closeButton);

        EnhancedVLayout layout = new EnhancedVLayout();
        layout.setLayoutMargin(5);
View Full Code Here

    @Override
    public DynamicForm getCustomSettingsForm() {
        final DashboardPortlet storedPortlet = this.portletWindow.getStoredPortlet();
        final Configuration portletConfig = storedPortlet.getConfiguration();

        DynamicForm customSettings = new DynamicForm();
        EnhancedVLayout page = new EnhancedVLayout();
        //build editor form container
        final DynamicForm form = new DynamicForm();
        form.setMargin(5);

        //add label about what configuration affects? redundant?
        //add filter operation status type selector
        final SelectItem operationStatusSelector = PortletConfigurationEditorComponent
            .getOperationStatusEditor(portletConfig);
        //        //add sort priority selector
        //        final SelectItem resultSortSelector = PortletConfigurationEditorComponent
        //            .getResulSortOrderEditor(portletConfig);
        //add result count selector
        final SelectItem resultCountSelector = PortletConfigurationEditorComponent.getResultCountEditor(portletConfig);

        //add range selector
        final CustomConfigMeasurementRangeEditor measurementRangeEditor = PortletConfigurationEditorComponent
            .getMeasurementRangeEditor(portletConfig);

        form.setItems(operationStatusSelector, resultCountSelector);

        //submit handler
        customSettings.addSubmitValuesHandler(new SubmitValuesHandler() {

            @Override
            public void onSubmitValues(SubmitValuesEvent event) {

                //result count
                Configuration updatedConfig = AbstractActivityView.saveResultCounterSettings(resultCountSelector,
                    portletConfig);

                //time range configuration
                updatedConfig = AbstractActivityView.saveMeasurementRangeEditorSettings(measurementRangeEditor,
                    portletConfig);

                //operation priority
                updatedConfig = AbstractActivityView.saveOperationStatusSelectorSettings(operationStatusSelector,
                    portletConfig);

                //persist and reload portlet
                storedPortlet.setConfiguration(updatedConfig);
                configure(portletWindow, storedPortlet);
                //resynch the config object in the datasource
                ((GroupOperationsCriteriaDataSource) groupOperations.getDataSource()).setPortletConfig(updatedConfig);
                //apply latest settings to the visible result set
                refresh();
            }
        });
        form.markForRedraw();
        page.addMember(measurementRangeEditor);
        page.addMember(form);
        customSettings.addChild(page);
        return customSettings;
    }
View Full Code Here

        agentSection = section;
        initSectionCount++;
    }

    private void prepareDetailsSection(SectionStack stack, PartitionEvent partitionEvent) {
        final DynamicForm form = new DynamicForm();
        form.setMargin(10);
        form.setWidth100();
        form.setWrapItemTitles(false);
        form.setNumCols(2);

        StaticTextItem ctimeItem = new StaticTextItem(FIELD_CTIME.propertyName(),
            MSG.view_adminTopology_partitionEventsDetail_eventExecutionTime());
        ctimeItem.setValue(TimestampCellFormatter.format(Long.valueOf(partitionEvent.getCtime()),
            TimestampCellFormatter.DATE_TIME_FORMAT_LONG));

        StaticTextItem addressItem = new StaticTextItem(FIELD_EVENT_TYPE.propertyName(),
            MSG.view_adminTopology_partitionEventsDetail_eventType());
        addressItem.setValue(partitionEvent.getEventType());

        StaticTextItem eventDetailItem = new StaticTextItem(FIELD_EVENT_DETAIL.propertyName(),
            MSG.view_adminTopology_partitionEventsDetail_eventDetails());
        eventDetailItem.setValue(partitionEvent.getEventDetail());

        StaticTextItem subjectPortItem = new StaticTextItem(FIELD_SUBJECT_NAME.propertyName(),
            FIELD_SUBJECT_NAME.title());
        subjectPortItem.setValue(partitionEvent.getSubjectName());

        StaticTextItem execStatusItem = new StaticTextItem(FIELD_EXECUTION_STATUS.propertyName(),
            FIELD_EXECUTION_STATUS.title());
        execStatusItem.setValue(partitionEvent.getExecutionStatus());

        form.setItems(ctimeItem, addressItem, eventDetailItem, subjectPortItem, execStatusItem);

        SectionStackSection section = new SectionStackSection(MSG.view_adminTopology_partitionEvents_details());
        section.setExpanded(true);
        section.setItems(form);
View Full Code Here

                }
            });
    }

    private void showDetails(ListGridRecord record) {
        DynamicForm form = new DynamicForm();
        form.setHeight100();
        form.setWidth100();
        form.setPadding(20);

        StaticTextItem status = new StaticTextItem("status", MSG.common_title_status());
        status.setValueIcons(statusIcons);
        status.setValueIconHeight(11);
        status.setValueIconWidth(11);
        status.setShowValueIconOnly(true);

        StaticTextItem user = new StaticTextItem("user", MSG.common_title_user());

        StaticTextItem timestamp = new StaticTextItem("timestamp", MSG.common_title_timestamp());
        timestamp.setDateFormatter(DateDisplayFormat.TOLOCALESTRING);

        StaticTextItem action = new StaticTextItem("action", MSG.view_bundle_deploy_action());
        StaticTextItem info = new StaticTextItem("info", MSG.common_severity_info());
        StaticTextItem category = new StaticTextItem("category", MSG.common_title_category());

        StaticTextItem message = new StaticTextItem("message", MSG.common_title_message());
        message.setTitleVAlign(VerticalAlignment.TOP);

        TextAreaItem detail = new TextAreaItem("attachment", MSG.common_title_details());
        detail.setTitleVAlign(VerticalAlignment.TOP);
        detail.setMinHeight(100);
        detail.setHeight("100%");
        detail.setWidth("100%");
        detail.addChangeHandler(new ChangeHandler() {
            @Override
            public void onChange(ChangeEvent event) {
                event.cancel(); // we want the user to interact with the text to copy it, but not to edit it
            }
        });

        form.setItems(timestamp, action, category, user, status, info, message, detail);
        form.editRecord(record);

        Window win = new ErrorMessageWindow(MSG.view_bundle_deploy_installDetails(), form);
        win.setWidth(500);
        win.show();
    }
View Full Code Here

            timeoutItem = new DurationItem(AbstractOperationScheduleDataSource.Field.TIMEOUT,
                MSG.view_operationScheduleDetails_field_timeout(), TimeUnit.MILLISECONDS, supportedUnits, false, false);
            ProductInfo productInfo = CoreGUI.get().getProductInfo();
            timeoutItem.setContextualHelp(MSG.widget_resourceFactoryWizard_timeoutHelp(productInfo.getShortName()));

            DynamicForm timeoutForm = new DynamicForm();
            timeoutForm.setFields(timeoutItem);
            timeoutForm.setMargin(10);
            vLayout.addMember(timeoutForm);
        }

        // if this is a newCanvas, or if the starting config has changed, create a new config editor. The starting
        // config (i.e. template) may have changed if the user, via the previous button, backed up and changed the
View Full Code Here

        bundleGroupsTab.setPane(new BundleGroupsListView(criteria, null));
        return bundleGroupsTab;
    }

    private DynamicForm createSummaryForm() {
        DynamicForm form = new DynamicForm();
        form.setWidth100();
        form.setColWidths("20%", "40%", "40%");
        form.setNumCols(3);
        form.setAutoHeight();
        form.setWrapItemTitles(false);
        form.setExtraSpace(10);
        form.setIsGroup(true);
        form.setGroupTitle(MSG.common_title_summary());
        form.setPadding(5);

        CanvasItem actionItem = new CanvasItem("actions");
        actionItem.setColSpan(1);
        actionItem.setRowSpan(3);
        actionItem.setShowTitle(false);
        actionItem.setCanvas(getActionCanvas());

        StaticTextItem versionCountItem = new StaticTextItem("versionCount", MSG.view_bundle_list_versionsCount());
        versionCountItem.setValue(bundle.getBundleVersions() != null ? bundle.getBundleVersions().size() : 0);

        StaticTextItem destinationsCountItem = new StaticTextItem("destinationsCount",
            MSG.view_bundle_list_destinationsCount());
        destinationsCountItem.setValue(bundle.getDestinations() != null ? bundle.getDestinations().size() : 0);

        StaticTextItem descriptionItem = new StaticTextItem("description", MSG.common_title_description());
        descriptionItem.setValue(StringUtility.escapeHtml(bundle.getDescription()));

        form.setFields(versionCountItem, actionItem, destinationsCountItem, descriptionItem);

        return form;
    }
View Full Code Here

            public void onSuccess(HashMap<String, String> result) {
                String version = result.get("rhq-agent.latest.version");
                String build = result.get("rhq-agent.latest.build-number");
                String md5 = result.get("rhq-agent.latest.md5");

                DynamicForm form = new DynamicForm();
                form.setMargin(10);
                form.setWidth100();

                StaticTextItem versionItem = new StaticTextItem("agentVersion", MSG
                    .view_admin_downloads_agent_version());
                versionItem.setValue(version);
                versionItem.setWrapTitle(false);

                StaticTextItem buildItem = new StaticTextItem("agentBuild", MSG
                    .view_admin_downloads_agent_buildNumber());
                buildItem.setValue(build);
                buildItem.setWrapTitle(false);

                StaticTextItem md5Item = new StaticTextItem("agentMd5", MSG.view_admin_downloads_agent_md5());
                md5Item.setValue(md5);
                md5Item.setWrapTitle(false);

                StaticTextItem linkItem = new StaticTextItem("agentLink");
                linkItem.setTitle(MSG.common_label_link());
                linkItem.setValue("<a href=\"/agentupdate/download\">"
                    + MSG.view_admin_downloads_agent_link_value(version, build) + "</a>");

                SpacerItem spacerItem = new SpacerItem("agentSpacer");
                spacerItem.setHeight(10);

                StaticTextItem helpItem = new StaticTextItem("agentHelp");
                helpItem.setColSpan(2);
                helpItem.setShowTitle(false);
                helpItem.setValue(MSG.view_admin_downloads_agent_help(productInfo.getShortName()));

                form.setItems(versionItem, buildItem, md5Item, linkItem, spacerItem, helpItem);

                agentSection.setItems(form);
                agentSection.setExpanded(true);
                sectionStack.markForRedraw();
            }
View Full Code Here

        buildUI();
    }

    private void buildUI() {

        dynamicForm = new DynamicForm();
        dynamicForm.setNumCols(3);

        operationArgumentsCanvasItem = new EnhancedHLayout();
        operationArgumentsCanvasItem.setOverflow(Overflow.VISIBLE);
        operationArgumentsCanvasItem.setHeight(400);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.DynamicForm

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.