Package org.cast.cwm.data.component

Examples of org.cast.cwm.data.component.FeedbackBorder


      radioGroup.add(new Radio<Role>("teacher", new Model<Role>(Role.TEACHER), radioGroup));
      radioGroup.add(new Radio<Role>("student", new Model<Role>(Role.STUDENT), radioGroup));
      radioGroup.setRequired(true);
     
      // this would be the standard portion of this
      add(new FeedbackBorder("usernameBorder")
        .add(new TextField<String>("username")
            .add(StringValidator.lengthBetween(6, 32))
            .add(new PatternValidator("[\\w-.]+"))
            .add(new UniqueUserFieldValidator(Field.USERNAME))
            .setRequired(true)));
     
      add(new FeedbackBorder("firstnameBorder")
        .add(new TextField<String>("firstName")
          .add(StringValidator.maximumLength(32))
          .setRequired(false)));
     
      add(new FeedbackBorder("lastnameBorder")
        .add(new TextField<String>("lastName")
          .add(StringValidator.maximumLength(32))
          .setRequired(false)));
     
      add(new FeedbackBorder("emailBorder")
        .add(email = (TextField<String>) new TextField<String>("email")
          .add(EmailAddressValidator.getInstance())
          .add(StringValidator.maximumLength(255))
          .add(new UniqueUserFieldValidator(Field.EMAIL))
          .setRequired(true)));
     
      add(new FeedbackBorder("verifyEmailBorder")
        .add(verifyEmail = (TextField<String>) new TextField<String>("verifyEmail", new Model<String>())
          .setRequired(true)));

      add(new FeedbackBorder("passwordBorder")
        .add(password = (PasswordTextField) new PasswordTextField("password", new Model<String>())
          .add(StringValidator.lengthBetween(4, 32))
          .add(new PatternValidator("[\\w!@#$%^&*()-=_+\\\\.,;:/]+"))
          .setRequired(true)));

      add(new FeedbackBorder("verifyPasswordBorder")
        .add(verifyPassword = (PasswordTextField) new PasswordTextField("verifyPassword", new Model<String>())
          .setRequired(true)));
     
      // Passwords and email addresses have to match
      add(new EqualPasswordConvertedInputValidator(password, verifyPassword));
View Full Code Here


      add (fields = new WebMarkupContainer("fields"));
      if (user == null)
        fields.setVisible(false);
     
      fields.add (new WebMarkupContainer("oldPassContainer")
        .add((new FeedbackBorder("oldPassBorder"))
            .add(new PasswordTextField("oldPass", new Model<String>())
              .setLabel(new Model<String>("Old Password"))
              .add (new CorrectPasswordValidator())))
        .setVisible(!haveKey));
     
      fields.add((new FeedbackBorder("passwordBorder"))
        .add(password = (PasswordTextField) new PasswordTextField("password", new Model<String>())
          .setLabel(new Model<String>("New Password"))
          .add(StringValidator.lengthBetween(4, 32))
          .add(new PatternValidator("[\\w!@#$%^&*()-=_+\\\\.,;:/]+"))
          .setRequired(true)));

      fields.add((new FeedbackBorder("verifyPasswordBorder"))
        .add(verifyPassword = (PasswordTextField) new PasswordTextField("verifyPassword", new Model<String>())
          .setLabel(new Model<String>("Verify New Password"))
          .setRequired(true)));
     
      add(new EqualPasswordConvertedInputValidator(password, verifyPassword));
View Full Code Here

    protected TextField<String> email;
   
    protected EmailForm(String id) {
      super(id);

      add(new FeedbackBorder("emailBorder")
        .add(email = (TextField<String>) new TextField<String>("email", new Model<String>(""))
          .add(EmailAddressValidator.getInstance())
          .add(StringValidator.maximumLength(255))
          .setRequired(true)));
    }
View Full Code Here

TOP

Related Classes of org.cast.cwm.data.component.FeedbackBorder

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.