I have a Page level Model:
class Person {
  String work;
  String cell;
}

I have a component such as:
class PhoneNumber extends Panel {
   class Phone {
       String one;
       String two;
       String three;

       public String toString() {
           return one + two + three;
       }
   }

   public PhoneNumber(String id, IModel m) {
       super(id, new Model(new Phone()));
       TextField one = new TextField("one", new
PropertyModel(getModelObject(), "one"));
       TextField two = new TextField("two", new
PropertyModel(getModelObject(), "two"));
       TextField three = new TextField("three", new
PropertyModel(getModelObject(), "three"));
   }
}

On my page I'm doing:
Person p = new Person();
new PhoneNumber("workInput", new PropertyModel(p, "work"));
new PhoneNumber("cellInput", new PropertyModel(p, "cell"));


So how do I map the internal model for my panel ("Phone") to the passed in
model?

Cheers,
-js
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to