Examples of addValidator()


Examples of org.apache.oodt.cas.cli.option.AdvancedCmdLineOption.addValidator()

      // Add validator which will cause fail.
      AdvancedCmdLineOption option = (AdvancedCmdLineOption) getOptionByName("message", args.getSupportedOptions());
      ArgRegExpCmdLineOptionValidator validator = new ArgRegExpCmdLineOptionValidator();
      validator.setAllowedArgs(Lists.newArrayList("\\d{1,2}"));
      option.addValidator(validator);

      // Expect fail.
      assertFalse(determineFailedValidation(validate(args)).isEmpty());
   }
View Full Code Here

Examples of org.apache.syncope.console.wicket.markup.html.form.AjaxTextFieldPanel.addValidator()

        form.setModel(new CompoundPropertyModel(notificationTO));

        final AjaxTextFieldPanel sender = new AjaxTextFieldPanel("sender", getString("sender"),
                new PropertyModel<String>(notificationTO, "sender"));
        sender.addRequiredLabel();
        sender.addValidator(EmailAddressValidator.getInstance());
        form.add(sender);

        final AjaxTextFieldPanel subject = new AjaxTextFieldPanel("subject", getString("subject"),
                new PropertyModel<String>(notificationTO, "subject"));
        subject.addRequiredLabel();
View Full Code Here

Examples of org.apache.wss4j.stax.ext.WSSSecurityProperties.addValidator()

        Properties cryptoProperties =
            CryptoFactory.getProperties("insecurity.properties", this.getClass().getClassLoader());
        inProperties.setSignatureVerificationCryptoProperties(cryptoProperties);
       
        CustomStaxSamlValidator validator = new CustomStaxSamlValidator();
        inProperties.addValidator(WSSecurityEngine.SAML_TOKEN, validator);
        inProperties.addValidator(WSSecurityEngine.SAML2_TOKEN, validator);
       
        WSS4JStaxInInterceptor inhandler = new WSS4JStaxInInterceptor(inProperties);
        service.getInInterceptors().add(inhandler);
       
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      }

      Panel panel = new Panel(null, null);
      panel.setProperty("layout", new GridLayout(1, 2));
      TextField widthField = new TextField(panel, null);
      widthField.addValidator(new IntegerValidator());
      widthField.setProperty("key", "width");
      TextField heightField = new TextField(panel, null);
      heightField.addValidator(new IntegerValidator());
      heightField.setProperty("key", "height");
      panel.addChild(widthField, null);
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      panel.setProperty("layout", new GridLayout(1, 2));
      TextField widthField = new TextField(panel, null);
      widthField.addValidator(new IntegerValidator());
      widthField.setProperty("key", "width");
      TextField heightField = new TextField(panel, null);
      heightField.addValidator(new IntegerValidator());
      heightField.setProperty("key", "height");
      panel.addChild(widthField, null);
      panel.addChild(heightField, null);
      panel.recursiveSetDataModel(dataModel);
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      TextField textField = new TextField(panel, null);
      textField.setProperty("key", "value_str");
      textField.finalizeConstruction();

      if (type.equals("int"))
        textField.addValidator(new IntegerValidator());
      else if (type.equals("long"))
        textField.addValidator(new LongValidator());
      else if (type.equals("float"))
        textField.addValidator(new FloatValidator());
      else if (type.equals("double"))
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      textField.finalizeConstruction();

      if (type.equals("int"))
        textField.addValidator(new IntegerValidator());
      else if (type.equals("long"))
        textField.addValidator(new LongValidator());
      else if (type.equals("float"))
        textField.addValidator(new FloatValidator());
      else if (type.equals("double"))
        textField.addValidator(new DoubleValidator());
      else
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      if (type.equals("int"))
        textField.addValidator(new IntegerValidator());
      else if (type.equals("long"))
        textField.addValidator(new LongValidator());
      else if (type.equals("float"))
        textField.addValidator(new FloatValidator());
      else if (type.equals("double"))
        textField.addValidator(new DoubleValidator());
      else
        throw new GUIException("Unknown numeric type");
View Full Code Here

Examples of org.beryl.gui.widgets.TextField.addValidator()

      else if (type.equals("long"))
        textField.addValidator(new LongValidator());
      else if (type.equals("float"))
        textField.addValidator(new FloatValidator());
      else if (type.equals("double"))
        textField.addValidator(new DoubleValidator());
      else
        throw new GUIException("Unknown numeric type");

      panel.addChild(textField, null);
      panel.recursiveSetDataModel(dataModel);
View Full Code Here

Examples of org.exoplatform.webui.form.UIFormStringInput.addValidator()

        OrganizationService service = this.getApplicationComponent(OrganizationService.class);
        User useraccount = service.getUserHandler().findUserByName(username);

        UIFormStringInput userName = new UIFormStringInput("userName", "userName", username);
        userName.setReadOnly(true);
        addUIFormInput(userName.addValidator(MandatoryValidator.class).addValidator(StringLengthValidator.class, 3, 30)
                .addValidator(ResourceValidator.class)
                .addValidator(ExpressionValidator.class, Utils.USER_NAME_VALIDATOR_REGEX, "ResourceValidator.msg.Invalid-char"));
        addUIFormInput(new UIFormStringInput("firstName", "firstName", useraccount.getFirstName())
                .addValidator(StringLengthValidator.class, 1, 45).addValidator(MandatoryValidator.class)
                .addValidator(PersonalNameValidator.class));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.