Package org.apache.wicket.markup.html.form.validation

Examples of org.apache.wicket.markup.html.form.validation.AbstractFormValidator


      final ListMultipleChoice<String> rolesChoiceField = new ListMultipleChoice<String>(
        "user.roles", allRoles);
      add(rolesChoiceField);
      final TextField<String> rolesSetNameField = new TextField<String>("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
View Full Code Here


      final ListMultipleChoice<String> rolesChoiceField = new ListMultipleChoice<String>(
        "user.roles", allRoles);
      add(rolesChoiceField);
      final TextField<String> rolesSetNameField = new TextField<String>("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
View Full Code Here

      final ListMultipleChoice rolesChoiceField = new ListMultipleChoice("user.roles",
          allRoles);
      add(rolesChoiceField);
      final TextField rolesSetNameField = new TextField("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
View Full Code Here

      final ListMultipleChoice<String> rolesChoiceField = new ListMultipleChoice<String>(
        "user.roles", allRoles);
      add(rolesChoiceField);
      final TextField<String> rolesSetNameField = new TextField<String>("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
View Full Code Here

      final ListMultipleChoice rolesChoiceField = new ListMultipleChoice("user.roles",
          allRoles);
      add(rolesChoiceField);
      final TextField rolesSetNameField = new TextField("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
          // so might as well just skip them here
View Full Code Here

      final ListMultipleChoice<String> rolesChoiceField = new ListMultipleChoice<String>(
        "user.roles", allRoles);
      add(rolesChoiceField);
      final TextField<String> rolesSetNameField = new TextField<String>("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        @Override
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
View Full Code Here

            final PasswordTextField confirmPasswordField = new PasswordTextField("passwordConfirm");
            confirmPasswordField.setRequired(false);
            confirmPasswordField.add(new ErrorHighlighter());
            add(confirmPasswordField);
            // validation, do the passwords match
            add(new AbstractFormValidator() {
                public FormComponent[] getDependentFormComponents() {
                    return new FormComponent[] {passwordField, confirmPasswordField};
                }
                public void validate(Form form) {
                    String a = (String) passwordField.getConvertedInput();
View Full Code Here

            setMaxSize(Bytes.megabytes(getJtrac().getAttachmentMaxSizeInMb()));
            // send notifications===============================================
            add(new CheckBox("sendNotifications"));
            // validation that assignedTo is not null if status is not null and not CLOSED
            // have to use FormValidator because this is conditional validation across two FormComponents
            add(new AbstractFormValidator() {
                public FormComponent[] getDependentFormComponents() {
                    // actually we depend on assignedToChoice also, but wicket logs a warning when the
                    // component is not visible but we are doing ajax.  anyway we use assignedToChoice.getInput()
                    // not assignedToChoice.convertedInput() so no danger there
                    return new FormComponent[] {statusChoice};
View Full Code Here

      final ListMultipleChoice<String> rolesChoiceField = new ListMultipleChoice<>(
        "user.roles", allRoles);
      add(rolesChoiceField);
      final TextField<String> rolesSetNameField = new TextField<>("user.rolesSetName");
      add(rolesSetNameField);
      add(new AbstractFormValidator()
      {
        @Override
        public FormComponent[] getDependentFormComponents()
        {
          // name and roles don't have anything to validate,
View Full Code Here

                target.addComponent(feedback);
            }
        }

        private void addValidator() {
            add(new AbstractFormValidator() {

                private static final long serialVersionUID = 1L;

                @Override
                public FormComponent<?>[] getDependentFormComponents() {
View Full Code Here

TOP

Related Classes of org.apache.wicket.markup.html.form.validation.AbstractFormValidator

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.