use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.
the class PageTaskAdd method initButtons.
private void initButtons(final Form mainForm) {
AjaxSubmitButton saveButton = new AjaxSubmitButton(ID_BUTTON_SAVE, createStringResource("PageBase.button.save")) {
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
savePerformed(target);
}
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
target.add(getFeedbackPanel());
}
};
mainForm.setDefaultButton(saveButton);
mainForm.add(saveButton);
AjaxButton backButton = new AjaxButton(ID_BUTTON_BACK, createStringResource("PageBase.button.back")) {
@Override
public void onClick(AjaxRequestTarget target) {
redirectBack();
}
};
mainForm.add(backButton);
}
use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.
the class MultipleAssignmentSelector method initSearchPanel.
private void initSearchPanel() {
final Form searchForm = new Form(ID_SEARCH_FORM);
add(searchForm);
searchForm.setOutputMarkupId(true);
SearchPanel search = new SearchPanel(ID_SEARCH, (IModel) searchModel, false) {
@Override
public void searchPerformed(ObjectQuery query, AjaxRequestTarget target) {
MultipleAssignmentSelector.this.searchPerformed(query, target);
}
};
searchForm.add(search);
}
use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.
the class PageSizePopover method initLayout.
protected void initLayout() {
Button popButton = new Button(ID_POP_BUTTON);
popButton.setOutputMarkupId(true);
add(popButton);
WebMarkupContainer popover = new WebMarkupContainer(ID_POPOVER);
popover.setOutputMarkupId(true);
add(popover);
Form form = new Form(ID_FORM);
popover.add(form);
AjaxSubmitButton button = new AjaxSubmitButton(ID_BUTTON) {
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
super.onError(target, form);
target.add(getPageBase().getFeedbackPanel());
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
super.onSubmit(target, form);
pageSizeChanged(target);
}
};
form.add(button);
TextField input = new TextField(ID_INPUT, createInputModel());
input.add(new RangeValidator(5, 100));
input.setLabel(createStringResource("PageSizePopover.title"));
input.add(new SearchFormEnterBehavior(button));
input.setType(Integer.class);
form.add(input);
}
use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.
the class TableConfigurationPanel method initPopoverLayout.
private void initPopoverLayout() {
WebMarkupContainer popover = new WebMarkupContainer(ID_POPOVER);
popover.setOutputMarkupId(true);
add(popover);
Form form = new Form(ID_FORM);
popover.add(form);
AjaxSubmitButton button = new AjaxSubmitButton(ID_BUTTON) {
@Override
protected void onError(AjaxRequestTarget target, Form<?> form) {
target.add(TableConfigurationPanel.this.get(createComponentPath(ID_POPOVER, ID_FORM, "inputFeedback")));
}
@Override
protected void onSubmit(AjaxRequestTarget target, Form<?> form) {
pageSizeChanged(target);
}
};
form.add(button);
TextField input = new TextField(ID_INPUT, createInputModel());
input.add(new RangeValidator(5, 100));
input.setLabel(createStringResource("PageSizePopover.title"));
input.add(new SearchFormEnterBehavior(button));
input.setType(Integer.class);
input.setOutputMarkupId(true);
FeedbackPanel feedback = new FeedbackPanel("inputFeedback", new ComponentFeedbackMessageFilter(input));
feedback.setOutputMarkupId(true);
form.add(feedback);
form.add(input);
}
use of org.apache.wicket.markup.html.form.Form in project midpoint by Evolveum.
the class AuditLogViewerPanel method initLayout.
private void initLayout() {
Form mainForm = new Form(ID_MAIN_FORM);
mainForm.setOutputMarkupId(true);
add(mainForm);
FeedbackPanel feedback = new FeedbackPanel(ID_FEEDBACK);
feedback.setOutputMarkupId(true);
mainForm.add(feedback);
initParametersPanel(mainForm);
addOrReplaceTable(mainForm);
}
Aggregations