Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-5329

"Required" flag initialized too early in PropertyValidator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 6.10.0
    • 6.11.0, 7.0.0-M1
    • wicket-bean-validation
    • None
    • Windows 2008 Server, JDK 1.7_u11 64bit, Glassfish 3.1.2.2

    Description

      Method PropertyValidator#setComponentRequiredFlag() called inside #bind() implementation causes ISE exception ("Could not resolve Property from component...") in #getProperty() in case, when component wasn't added to page hierarchy yet:

      Form<Person> form = new Form<>("form", new CompoundPropertyModel(person));
      TextField<String> requiredField = new TextField<>("firstName");
      requiredField.add(new PropertyValidator()); // ISE !
      form.add(requiredField);
      add(form);

      Attachments

        1. fix-WICKET-5329.patch
          2 kB
          Alexander Morozov

        Activity

          People

            mgrigorov Martin Tzvetanov Grigorov
            amorozov Alexander Morozov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: