Hi,
when I tried to upgrade to to Wicket 6.8.0 I found probably serious
issue. We have Form with two text fields ('username' and 'password').
We set CompoundPropertyModel and bound properties to two textfields. The
submit button uses AjaxSubmitLink. When I click to submit button the
the form shows feedback that 'username' and 'password' fields cannot be
empty. It works fine in 6.6.0 and 6.7.0 versions.
Form implementation:
form = new Form<LoginFormPanel>(ID_LOGIN_FORM) {
private static final long serialVersionUID = 1L;
private String username;
private String password;
@Override
protected void onInitialize() {
super.onInitialize();
setDefaultModel(new
CompoundPropertyModel<Form<LoginFormPanel>>(this));
usernameTF = new RequiredTextField<String>(ID_USERNAME);
usernameTF.setOutputMarkupId(true);
usernameTF.add(new DefaultFocusBehavior());
add(usernameTF);
add(new PasswordTextField(ID_PASSWORD));
add(new AjaxSubmitLink(ID_SUBMIT_LINK, this) {
/** */
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target,
Form<?> form) {
// process input
}
@Override
protected void onError(AjaxRequestTarget target,
Form<?> form) {
// Method is invoked only if the input is invalid
target.add(getPage());
}
});
}
Html of the form:
<form wicket:id="loginForm">
<label><wicket:message key="LoginFormPanel.lbUsername"
/></label> <br> <input type="text"
wicket:id="username" /> <br> <br>
<label><wicket:message
key="LoginFormPanel.lbPassword" /></label> <br>
<input type="password" wicket:id="password" /> <br>
<br>
<input type="submit"
wicket:message="value:LoginFormPanel.lbSubmit" class="ui-button-process"
wicket:id="submitLink" />
</form>
Petr
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org