Hi,

I'm new to Wicket, and, after reading the documentation, there are
still some doubts about the correct usage patterns of
IModel-implementing classes:

For what I could see, In the case of CompoundPropertyModel, it is best
to attach them to a high-level container, such as the page. Also,
since it is detached in the container's detach() method, they can't be
used outside the container In which they are attached. Is my
understanting correct?

I also have a doubt WRT the correct creation of a model used in
Dropdown fields. In my case, the falhes the user can select depends on
the model object, so I use, in it's load() method something like:
Object load() {
      int max= ((ObjectModel)getDefaultObject()).getMaximum();
      ArrayList<Integer> r = new ArrayList<Integer>();
      for (int i = 1; i <= max; i++)
         r.add(i);
      return r;
}
Is this pattern correct?

Also, it is an acceptable pattern to define the model classes as inner
classes In the page class? If I define them outside, the @SpringBean
annotation will work when used in these classes?

Thanks,
     Robson

-- 
Att,
  Robson Paniago

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to