Actually the example does set a model for the password field. As shown
in this snippet.
//Set compound model on the form, inputfields will use that model too.
super(id, new CompoundPropertyModel(new ValueMap()));
// only remember username, not passwords
add(new
TextField("username").setPersistent
no, you dont typically initialize the field. but you do want to
retrieve the result right? so you need to give the field a model.
wicket might not call model.getobject() on it, but it will call
model.setobject() when the form is submitted.
models do not contain data for markup, but for components.
On Thu, 12 Jun 2008, David Nedrow wrote:
> Couldn't resolve model type of
> Model:classname=[org.apache.wicket.model.CompoundPropertyModel
> $
> AttachedCompoundPropertyModel
> ]:nestedModel
> =
> [Model:classname
> =[org.apache.wicket.model.CompoundPropertyModel]:nestedModel=[username
>
Given the following from the wicket security quickstart (1.3-
SNAPSHOT)...
add(new PasswordTextField("password").setOutputMarkupId(false));
glassfish generates the following message
Couldn't resolve model type of
Model:classname=[org.apache.wicket.model.CompoundPropertyModel
$
Attached