what you want is a CompoundPropertyModel not the bound variant.

there is a searchbox on our wiki :)

http://www.wicket-wiki.org.uk/wiki/index.php/Models

-Igor


On 5/4/06, Bruno Borges <[EMAIL PROTECTED]> wrote:
Isn't this code correct?

class UserForm extends Form {
User user = new User(); // POJO Bean

<constructor> {
...
BoundCompoundPropertyModel model = new BoundCompoundPropertyModel(user);
add(new TextField("name", model));

add(new TextField("email", model)); // Can I do this? Use the same model object for different properties?
}

<on submit> {
String name = user.getName ();
// Why name is still null ?
}
}

Am I missing something here? Where in the docs has some reference for Property Models ?

--
Bruno Borges
[EMAIL PROTECTED]
Sun Certified Java Programmer for 1.4
Sun Certified Web Component Developer for 1.4

Reply via email to