use of org.apache.wicket.markup.html.form.StatelessForm in project wicket by apache.
the class StatelessPageWithFeedback method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
setStatelessHint(true);
error("error in onInitialize");
add(new FeedbackPanel("feedback"));
StatelessForm<Void> form = new StatelessForm<Void>("form");
add(form);
form.add(new SubmitLink("submit") {
private static final long serialVersionUID = 1L;
@Override
public void onSubmit() {
StatelessPageWithFeedback.this.error("error in onSubmit");
}
});
}
use of org.apache.wicket.markup.html.form.StatelessForm in project sandbox by irof.
the class StatelessPage method onInitialize.
@Override
protected void onInitialize() {
super.onInitialize();
Form<Void> form = new StatelessForm<Void>("form") {
@Override
protected void onSubmit() {
model.setObject(LocalDateTime.now().toString());
}
};
form.add(new Label("message", model));
add(form);
add(new StatelessLink("link.instance") {
@Override
public void onClick() {
setResponsePage(new StatelessPage());
}
});
add(new StatelessLink("link.class") {
@Override
public void onClick() {
setResponsePage(StatelessPage.class);
}
});
add(new StatelessLink("link.this") {
@Override
public void onClick() {
setResponsePage(StatelessPage.this);
}
});
add(new BookmarkablePageLink("link.stateful", StatefulPage.class));
add(new BookmarkablePageLink("link.stateless", StatelessPage.class));
add(new Label("version", getApplication().getFrameworkSettings().getVersion()));
add(new Label("page.instance", this.toString()));
}
Aggregations