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

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


        description = new TextAreaItem("description", MSG.common_title_description());
        description.setWidth(400);
        description.setHeight(50);
        description.setDefaultValue("");

        recursive = new CheckboxItem("recursive", MSG.view_dynagroup_recursive());

        templateSelectorTitleSpacer = new SpacerItem();
        templateSelectorTitleSpacer.setShowTitle(false);
        templateSelectorTitleSpacer.setColSpan(1);
        templateSelectorTitleSpacer.setEndRow(false);
View Full Code Here


            masterValueItem.setEndRow(true);

            // the "set all" unset field
            FormItem masterUnsetItem;
            if (!propertyDefinitionSimple.isRequired()) {
                final CheckboxItem unsetItem = new CheckboxItem(MEMBER_VALUES_EDITOR_FIELD_PREFIX + "unsetall");
                boolean unset = (masterPropertySimple == null || masterPropertySimple.getStringValue() == null);
                unsetItem.setValue(unset);
                unsetItem.setDisabled(isReadOnly(propertyDefinitionSimple, masterPropertySimple));
                unsetItem.setShowLabel(false);
                unsetItem.setLabelAsTitle(false);

                unsetItem.addChangedHandler(new ChangedHandler() {
                    public void onChanged(ChangedEvent changedEvent) {
                        Boolean isUnset = (Boolean) changedEvent.getValue();
                        masterValueItem.setDisabled(isUnset);
                        if (isUnset) {
                            setValue(masterValueItem, null);
                        }
                        masterValueItem.redraw();
                    }
                });

                masterValueItem.addChangeHandler(new ChangeHandler() {
                    public void onChange(ChangeEvent event) {
                        if (event.getValue() == null || event.getValue().toString().length() == 0) {
                            unsetItem.setValue(true);
                        } else {
                            unsetItem.setValue(false);
                        }
                    }
                });

                masterUnsetItem = unsetItem;
View Full Code Here

        addMember(spacer);

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

        CheckboxItem checkboxItem = new CheckboxItem("updateExistingSchedules",
            MSG.view_admin_measTemplates_updateExisting_title());
        checkboxItem.setDefaultValue(schedulesView.isUpdateExistingSchedules());
        checkboxItem.setTooltip(MSG.view_admin_measTemplates_updateExisting_tooltip());
        checkboxItem.setHoverWidth(200);
        checkboxItem.addChangedHandler(new ChangedHandler() {
            public void onChanged(ChangedEvent changedEvent) {
                boolean newValue = (Boolean) changedEvent.getValue();
                schedulesView.setUpdateExistingSchedules(newValue);
            }
        });
View Full Code Here

    form = new DynamicForm();
    form.setFields(username,pass);
    form.setAutoFocus(true)
   
    fillTextsWithCookie(username,pass);
    final CheckboxItem ch_remember = new CheckboxItem()
    ch_remember.setTitle("Remember me");
    ch_remember.setValue(true);
    DynamicForm remember_form = new DynamicForm();
    remember_form.setFields(ch_remember);
   
   
    final HTMLFlow message  = new HTMLFlow();
    //message.setVisible(true);
   
    IButton loginButton = new IButton("Login")
    //loginButton.setSelected(true);
    //loginButton.setLeft(300); 
    loginButton.addClickHandler(new ClickHandler() { 
      public void onClick(ClickEvent event) { 
        final String username = getFieldValue("username").toLowerCase();
        final String pass = getFieldValue("pass");
        if(isAnyEmptyField(username,pass))
          message.setContents("Please do not leave any field empty!");
        else
          systemcall.login(username,pass, new AsyncCallback<Boolean>(){
          public void onSuccess(Boolean success)
          {
            if(!success)
            {
              message.setContents("Failed to login!");
            }else
            {
              if(ch_remember.getValueAsBoolean())
                setLastLoginName(username, pass);
              else{
                if(username.equals(getLastUserName()) && pass.equals(getLastPassword())){
                  removeLastLoginName();
                }
              }
              window.destroy();
            }
          }
          public void onFailure(Throwable t)
          {
            Log.debug("Login->onFailure " + t);
          }
        });
    }

   
    });
   
    IButton createButton = new IButton("Create Account")
    createButton.setLeft(300)
    createButton.addClickHandler(new ClickHandler() { 
      public void onClick(ClickEvent event) { 
        final String username = getFieldValue("username").toLowerCase();
        final String pass = getFieldValue("pass");
        if(isAnyEmptyField(username,pass))
          message.setContents("Please do not leave any field empty!");
        else
          systemcall.createuser(username.toLowerCase(), pass, new AsyncCallback<Boolean>(){
          public void onSuccess(Boolean success)
          {
            Log.debug("Success : " + success);
            if(!success)
            {
              message.setContents("This id already exist. Try another one!");
            }else
            {
              systemcall.login(username.toLowerCase(), pass, new AsyncCallback<Boolean>()
                  {
                    public void onSuccess(Boolean success)
                    {
                      if(!success)
                      {
                        message.setContents("Failed to login!");
                      }else
                      {
                        if(ch_remember.getValueAsBoolean())
                          setLastLoginName(username, pass);
                        window.destroy();
                      }
                    }
                    public void onFailure(Throwable t)
View Full Code Here

    form.setWidth100();
    form.setHeight100();
    form.setTitleWidth(300);
    form.setColWidths(0, 50);
   
    useOfflineFunctionality = new CheckboxItem()
   
    useOfflineFunctionality.setLabelAsTitle(true);
    useOfflineFunctionality.setTitle("Use offline availability");
    useOfflineFunctionality.setHint("Enable to use YASGUI offline. Disable to avoid downloading YASUI locally (saves bandwidth)");
    useOfflineFunctionality.setValue(view.getSettings().useOfflineCaching());
   
    downloadNotification = new CheckboxItem();
    downloadNotification.setLabelAsTitle(true);
    downloadNotification.setTitle("Show download notification");
    downloadNotification.setHint("On every YASGUI update, your browser downloads a local version of YASGUI, and shows a download notification and progress bar");
    downloadNotification.setValue(view.getSettings().showAppcacheDownloadNotification());
   
View Full Code Here

            groupItem.setDefaultValue("-");
        else
            groupItem.setDefaultValue(id_group);

        //item with the state of that person.
        CheckboxItem activeItem = new CheckboxItem("fActive");
        configureFormsCheckboxItem(activeItem, 50, constants.active(), store);

        if (action == SHOW)
            form.setFields(nameItem, groupItem, activeItem);
        else {
View Full Code Here

        configureFormsItems(nameItem, WIDTH_FIELD, HEIGHT_FIELD, constants.name(), nameValue);

        final TextItem initialEstimationItem = new TextItem("fInitialEstimation");
        configureFormsItems(initialEstimationItem, WIDTH_FIELD, HEIGHT_FIELD, constants.initialEstimation(), initialEstimationValue);

        CheckboxItem assignedItem = new CheckboxItem("fAssigned");
        configureFormsCheckboxItem(assignedItem, WIDTH_FIELD_CHECK, constants.assigned(), assignedValue);

        CheckboxItem plannedItem = new CheckboxItem("fPlanned");
        configureFormsCheckboxItem(plannedItem, WIDTH_FIELD_CHECK, constants.planned(), plannedValue);

        CheckboxItem doneItem = new CheckboxItem("fDone");
        configureFormsCheckboxItem(doneItem, WIDTH_FIELD_CHECK, constants.done(), doneValue);
       

        final TextAreaItem descriptionItem = new TextAreaItem("fDescription");
        configureFormsItems(descriptionItem, WIDTH_FIELD, HEIGHT_FIELD_AREA, constants.description(), descriptionValue);
View Full Code Here

        MatchesFieldValidator matchesValidator = new MatchesFieldValidator();
        matchesValidator.setOtherField("password");
        matchesValidator.setErrorMessage("Passwords do not match");       
        passwordItem2.setValidators(matchesValidator);

        CheckboxItem acceptItem = new CheckboxItem();
        acceptItem.setName("acceptTerms");
        acceptItem.setTitle("I accept the terms of use.");
        acceptItem.setRequired(true);
        acceptItem.setWidth(150);

        ButtonItem validateItem = new ButtonItem();
        validateItem.setTitle("Validate");
        validateItem.addClickHandler(new ClickHandler() {
            public void onClick(ClickEvent event) {
View Full Code Here

        itemName = new ComboBoxItem("itemName");
        itemName.setOptionDataSource(supplyItemDS);
        itemName.setPickListWidth(250);

        CheckboxItem findInCategory = new CheckboxItem("findInCategory");
        findInCategory.setTitle("Use Category");
        findInCategory.setDefaultValue(true);
        findInCategory.setShouldSaveValue(false);

        setItems(findItem, skuItem, itemName, findInCategory);
    }
View Full Code Here

        configureFormsItems(priorityItem, WIDTH_FIELD, HEIGHT_FIELD, constants.priority(), String.valueOf(priority));

        final TextItem initialEstimationItem = new TextItem("fInitialEstimation");
        configureFormsItems(initialEstimationItem, WIDTH_FIELD, HEIGHT_FIELD, constants.initialEstimation(), inEstimation);

        CheckboxItem assignedItem = new CheckboxItem("fAssigned");
        configureFormsCheckboxItem(assignedItem, WIDTH_FIELD_CHECK, constants.assigned(), assigned);

        CheckboxItem plannedItem = new CheckboxItem("fPlanned");
        configureFormsCheckboxItem(plannedItem, WIDTH_FIELD_CHECK, constants.planned(), planned);

        CheckboxItem doneItem = new CheckboxItem("fDone");
        configureFormsCheckboxItem(doneItem, WIDTH_FIELD_CHECK, constants.done(), done);

        final TextAreaItem descriptionItem = new TextAreaItem("fDescription");
        configureFormsItems(descriptionItem, WIDTH_FIELD, HEIGHT_FIELD_AREA, constants.description(), description);
View Full Code Here

TOP

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

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.