Package com.smartgwt.client.widgets.form.validator

Examples of com.smartgwt.client.widgets.form.validator.Validator


  }

  private static List<Validator> convertConstraints(PrimitiveAttributeInfo info) {
    List<Validator> validators = new ArrayList<Validator>();
    for (ConstraintInfo constraint : info.getValidator().getConstraints()) {
      Validator validator = null;
      if (constraint instanceof DecimalMaxConstraintInfo) {
        validator = createFromDecimalMax((DecimalMaxConstraintInfo) constraint);
      } else if (constraint instanceof DecimalMinConstraintInfo) {
        validator = createFromDecimalMin((DecimalMinConstraintInfo) constraint);
      } else if (constraint instanceof DigitsConstraintInfo) {
View Full Code Here


    }

    protected List<Validator> buildValidators(PropertyDefinitionSimple propertyDefinition, PropertySimple property) {
        List<Validator> validators = new ArrayList<Validator>();

        Validator typeValidator = null;
        switch (propertyDefinition.getType()) {
        case STRING:
        case LONG_STRING:
        case FILE:
        case DIRECTORY:
View Full Code Here

        clusterForm = buildForm("<div align='left' class='storageConfig'><div>"
            + MSG.view_adminTopology_storageNodes_clusterSettings_clusterSettings() + "</div><div>"
            + MSG.view_adminTopology_storageNodes_clusterSettings_clusterSettings_desc() + "</div>");

        List<FormItem> items = buildHeaderItems();
        Validator validator = new IsIntegerValidator();

        // cql port field
        FormItemBuilder builder = new FormItemBuilder();
        List<FormItem> cqlPortItems = builder.withName(FIELD_CQL_PORT.propertyName()).withTitle(FIELD_CQL_PORT.title())
            .withValue(String.valueOf(settings.getCqlPort()))
View Full Code Here

            this.selector = new SingleCompatibleResourceGroupSelector("group", MSG.common_title_resource_group(),
                wizard.getBundle().getBundleType().getName());

            this.selector.setWidth(300);
            this.selector.setRequired(true);
            Validator validator = new IsIntegerValidator();
            validator.setErrorMessage(MSG.view_bundle_deployWizard_error_8());
            this.selector.setValidators(validator);
            // BZ 1134486 - for some reason, we are getting spurious "null" change events in certain circumstances - ignore them
            this.selector.addChangeHandler(new ChangeHandler() {
                @Override
                public void onChange(ChangeEvent event) {
View Full Code Here

        id.setValue(groupDefinition.getId());
        name.setValue(groupDefinition.getName());
        recursive.setValue(groupDefinition.isRecursive());
        description.setValue(groupDefinition.getDescription());
        recalculationInterval.setValue(groupDefinition.getRecalculationInterval() / (60 * 1000));
        Validator intervalValidator = new IsIntegerValidator();
        intervalValidator.setErrorMessage(MSG.view_dynagroup_recalculationInterval_error());
        recalculationInterval.setValidators(intervalValidator);
        expression.setValue(groupDefinition.getExpression());

        Validator nameValidator = new RegExpValidator("^[^\\<\\$\\'\\{\\[]{1,100}$");
        nameValidator.setErrorMessage("Name must not contain following characters: < $ ' [ {");
        name.setValidators(nameValidator);

        final DynamicForm form = new DynamicForm();
        form.setFields(id, name, description, templateSelectorTitleSpacer, templateSelector, expression, recursive,
            recalculationInterval);
View Full Code Here

TOP

Related Classes of com.smartgwt.client.widgets.form.validator.Validator

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.