Wicket
  1. Wicket
  2. WICKET-5329

"Required" flag initialized too early in PropertyValidator

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.10.0
    • Fix Version/s: 6.11.0, 7.0.0
    • Component/s: wicket-bean-validation
    • Labels:
      None
    • Environment:
      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);

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

        Activity

        Hide
        Alexander Morozov added a comment -

        Please, review and apply patch.

        Show
        Alexander Morozov added a comment - Please, review and apply patch.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Alexander Morozov
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development