use of com.evolveum.midpoint.web.component.form.MidpointForm 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 MidpointForm<>(ID_FORM);
popover.add(form);
AjaxSubmitButton button = new AjaxSubmitButton(ID_BUTTON) {
@Override
protected void onError(AjaxRequestTarget target) {
super.onError(target);
target.add(getPageBase().getFeedbackPanel());
}
@Override
protected void onSubmit(AjaxRequestTarget target) {
super.onSubmit(target);
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 com.evolveum.midpoint.web.component.form.MidpointForm 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 MidpointForm<>(ID_FORM);
popover.add(form);
AjaxSubmitButton button = new AjaxSubmitButton(ID_BUTTON) {
@Override
protected void onError(AjaxRequestTarget target) {
target.add(TableConfigurationPanel.this.get(createComponentPath(ID_POPOVER, ID_FORM, "inputFeedback")));
}
@Override
protected void onSubmit(AjaxRequestTarget target) {
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 com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageCertDecisions method initLayout.
// endregion
// region Layout
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
CertWorkItemDtoProvider provider = createProvider();
BoxedTablePanel<CertWorkItemDto> table = new BoxedTablePanel<CertWorkItemDto>(ID_DECISIONS_TABLE, provider, initColumns(), UserProfileStorage.TableId.PAGE_CERT_DECISIONS_PANEL) {
private static final long serialVersionUID = 1L;
@Override
protected WebMarkupContainer createHeader(String headerId) {
return new SearchFragment(headerId, ID_TABLE_HEADER, PageCertDecisions.this, Model.of(getCertDecisionsStorage().getShowNotDecidedOnly()));
}
};
table.setShowPaging(true);
table.setOutputMarkupId(true);
mainForm.add(table);
// adding this on outer feedback panel prevents displaying the error messages
// addVisibleOnWarningBehavior(getMainFeedbackPanel());
// addVisibleOnWarningBehavior(getTempFeedbackPanel());
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageCertDefinition method initLayout.
// endregion
// region Layout
private void initLayout() {
CertDefinitionSummaryPanel summaryPanel = new CertDefinitionSummaryPanel(ID_SUMMARY_PANEL, new PropertyModel<>(definitionModel, CertDefinitionDto.F_DEFINITION), WebComponentUtil.getSummaryPanelSpecification(AccessCertificationDefinitionType.class, getCompiledGuiProfile()));
summaryPanel.add(new VisibleBehaviour(() -> StringUtils.isNotEmpty(definitionModel.getObject().getOldDefinition().getOid())));
add(summaryPanel);
Form<?> mainForm = new MidpointForm<>(ID_MAIN_FORM);
add(mainForm);
initTabs(mainForm);
initButtons(mainForm);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageCertCampaign method initLayout.
private void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
initBasicInfoLayout(mainForm);
initStatisticsLayout(mainForm);
initTableLayout(mainForm);
initButtons(mainForm);
}
Aggregations