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

A 'recorder' subcomponent of Palette is used as property expression in the CompoundPropertyModel

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Duplicate
    • 1.3.0-beta2
    • 1.3.0-beta3
    • wicket, wicket-extensions
    • None
    • Windows XP SP2, Sun JDK 1.5, Jetty 6.1.3

    Description

      When using a Palette component in the form and that form has a CompoundPropertyModel model, the palette's internal subcomponent which has an id 'recorder' is apparently used as the property expression. This usually causes an exception, since the form has neither getRecorder, nor setRecorder methods.

      Author author = new Author();
      author.setFirstName("John");
      author.setLastName("Milton");

      Form form = new Form("form", new CompoundPropertyModel(author));
      add(form);
      form.add(new Label("firstName"));
      form.add(new Label("lastName"));
      List names = Arrays.asList(new String[]

      {"Ferko", "Mirko", "Janko", "Zuzanka", "Miško"}

      );
      IModel model = new PropertyModel(this, "selectedAuthors");
      form.add(new Palette("lstAuthors", model, new Model((Serializable) names), new ChoiceRenderer(), 5, false));

      Wicket 1.3.0 beta1 and previous did not throw the exception, however Wicket 1.3.0 beta2 starts doing that:

      WicketMessage: No get method defined for class: class wt.Author expression: recorder

      Root cause:

      org.apache.wicket.WicketRuntimeException: No get method defined for class: class wt.Author expression: recorder
      at org.apache.wicket.util.lang.PropertyResolver.getGetAndSetter(PropertyResolver.java:391)
      at org.apache.wicket.util.lang.PropertyResolver.getObjectAndGetSetter(PropertyResolver.java:266)

      Attachments

        1. wicket-723-quickstart.zip
          1.99 MB
          Robert Novotny
        2. WICKET-723.patch.txt
          0.7 kB
          Vincent Demay

        Issue Links

          Activity

            People

              Unassigned Unassigned
              novotnyr Robert Novotny
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: