Hey,
I have a form and I want to submit it via Ajax:
<wicket:panel>
<form wicket:id="form">
<div wicket:id="feedback"></div>
<table width="100%" cellpadding="2" cellspacing="2">
<tr>
<td><label><wicket:message key="name"/>
</label></td>
<td><span wicket:id="nameBorder">
<input type="text" wicket:id="name"/></span></td>
</tr>
<tr>
<td><wicket:message key="note"/></td>
<td><textarea cols="20" rows="10"
wicket:id="note"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input wicket:id="create" type="button" value="Create Group"/></td>
</tr>
</table>
</form>
</wicket:panel>
public CreateGroupPanel(String id) {
super(id);
setOutputMarkupId(true);
final Form form = new Form("form",
new CompoundPropertyModel(new Group()));
add(form);
form.add(new FeedbackPanel("feedback"));
form.add(new
FormComponentFeedbackBorder("nameBorder").add(new
TextField("name").setRequired(true)));
form.add(new TextArea("note"));
form.add(new AjaxSubmitLink("create") {
@Override
protected void onSubmit(AjaxRequestTarget target,
Form form) {
Group group = (Group) form.getModelObject();
System.out.println("Logging: " + group);
}
});
}
But nothing is got print on the console.
Any ideas what is going wrong?
FireFox 3.0.7
Ubuntu 8.10
Wicket 1.3.5
Thanks.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]