Hello,

I'm working on an application that will have a simple Form in front of a
rather complex object graph. I'm using JPA implemented by Hibernate at the
persistence layer.

In an effort to keep things simple I'm using CompoundPropertyModel in the
Form constructor:

            Person p = session.getCurrentPerson();
            setModel(new CompoundPropertyModel(p));

CompoundPropertyModel allows me to easily define anonymous TextFields to
capture the new values of plain and object attributes of Person:

            add(new TextField("lastName");
            // ...
            add(new TextField("address.city");

Now suppose Person has an attribute whose type is a collection:

            private List<Phone> phones;

How can I access all phones in the collection and then generate the
corresponding TextFields for the two (or more) Phone attributes?

Thanks so much,

Cristina

-- 
View this message in context: 
http://www.nabble.com/CompoundPropertyModel-and-collection-attributes-tp19964896p19964896.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to