Package com.smartgwt.client.widgets.form.fields

Examples of com.smartgwt.client.widgets.form.fields.TextItem


                case STRING:
                case FILE:
                case DIRECTORY:
                case LONG:
                    // Treat values with type LONG as strings, since GWT does not support longs.
                    valueItem = new TextItem();
                    break;
                case LONG_STRING:
                    valueItem = new TextAreaItem();
                    break;
                case PASSWORD:
View Full Code Here


    }

    protected DynamicForm getAvailableFilterForm() {
        DynamicForm availableFilterForm = new DynamicForm();
        availableFilterForm.setNumCols(4);
        final TextItem search = new TextItem("search", MSG.common_title_search());

        final SelectItem bundleTypeSelect = new SortedSelectItem("bundleType", MSG.view_bundle_bundleType());
        bundleService.getAllBundleTypes(new AsyncCallback<ArrayList<BundleType>>() {
            public void onFailure(Throwable caught) {
                CoreGUI.getErrorHandler().handleError(MSG.dataSource_bundle_loadFailed(), caught);
View Full Code Here

        form.setMargin(10);
        form.setWidth100();
        form.setWrapItemTitles(false);
        form.setNumCols(2);

        final TextItem nameItem = new TextItem(FIELD_NAME.propertyName(), FIELD_NAME.title());
        nameItem.setValue(affinityGroup.getName());

        EnhancedToolStrip footer = new EnhancedToolStrip();
        footer.setPadding(5);
        footer.setWidth100();
        footer.setMembersMargin(15);

        IButton saveButton = new EnhancedIButton(MSG.common_button_save(), ButtonColor.BLUE);
        saveButton.setOverflow(Overflow.VISIBLE);
        saveButton.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
                affinityGroup.setName(nameItem.getValueAsString());
                GWTServiceLookup.getTopologyService().updateAffinityGroup(affinityGroup, new AsyncCallback<Void>() {
                    public void onSuccess(Void result) {
                        Message msg = new Message(MSG.view_adminTopology_message_agroupRenamed(
                            String.valueOf(affinityGroupId), affinityGroup.getName(), nameItem.getValueAsString()),
                            Message.Severity.Info);
                        CoreGUI.getMessageCenter().notify(msg);
                    }

                    public void onFailure(Throwable caught) {
View Full Code Here

    @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

public class CalltimeTableView extends Table<CalltimeDataSource> {
    private final TextItem destinationFilter;

    public CalltimeTableView(EntityContext context) {
        setDataSource(new CalltimeDataSource(context));
        destinationFilter = new TextItem(CalltimeDataSource.FILTER_DESTINATION,
            MSG.view_resource_monitor_calltime_destinationFilter());
    }
View Full Code Here

            this.readOnly = readOnly;
            return this;
        }

        public List<FormItem> build() {
            return build(new TextItem());
        }
View Full Code Here

        super.onInit();

        setTitle(MSG.view_dynagroup_exprBuilder_title());

        // build the individual components
        this.valueItem = new TextItem("value", MSG.common_title_value());
        this.valueItem.setTooltip(MSG.view_dynagroup_exprBuilder_value_tooltip());
        this.valueItem.setWidth(200);
        this.valueItem.setHoverWidth(250);
        this.valueItem.setDefaultValue("");
        this.valueItem.addChangedHandler(new ChangedHandler() {
View Full Code Here

        // drift file path filter
        SpinnerItem startFilter = new SpinnerItem(FILTER_CAROUSEL_START, getCarouselStartFilterLabel());
        startFilter.setMin(1);
        //TextItem startFilter = new TextItem(FILTER_CAROUSEL_START, getCarouselStartFilterLabel());
        TextItem numFilter = new TextItem(FILTER_CAROUSEL_SIZE, getCarouselSizeFilterLabel());
        carouselFormItems[i++] = startFilter;
        carouselFormItems[i++] = numFilter;

        this.filterForm.setNumCols(4);
        this.filterForm.setItems(carouselFormItems);
View Full Code Here

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

        TextItem nameItem = null;
        if (dashboardContainer.supportsDashboardNameEdit()) {
            nameItem = new TextItem("name", MSG.common_title_dashboard_name());
            nameItem.setValue(storedDashboard.getName());
            nameItem.setLength(200);
            nameItem.setWrapTitle(false);
            nameItem.addBlurHandler(new BlurHandler() {
                public void onBlur(BlurEvent blurEvent) {
                    FormItem nameItem = blurEvent.getItem();
                    String name = (String) nameItem.getValue();
                    String trimmedName = (name == null) ? "" : name.trim();
                    if (dashboardContainer.isValidDashboardName(trimmedName)) {
                        storedDashboard.setName(trimmedName);
                        save();
                        dashboardContainer.updateDashboardNames();
                    } else {
                        // TODO: i18n
                        Message message = new Message("There is already a dashboard named '" + trimmedName
                            + "'. Please specify a name that is not already in use.", Message.Severity.Error, EnumSet
                            .of(Message.Option.Transient));
                        CoreGUI.getMessageCenter().notify(message);
                        nameItem.setValue(storedDashboard.getName());
                    }
                }
            });
        }
View Full Code Here

        }

        protected List<FormItem> getOnDrawItems() {
            List<FormItem> items = super.getOnDrawItems();

            TextItem version = new TextItem("editableVersion",
                MSG.view_alert_definition_notification_cliScript_editor_newScriptVersion());
            version.setColSpan(getNumCols());
            version.addChangedHandler(new ChangedHandler() {
                public void onChanged(ChangedEvent event) {
                    getField("version").setValue(event.getValue());
                }
            });
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.fields.TextItem

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.