use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class PageConnectorHosts method initLayout.
protected void initLayout() {
Form mainForm = new MidpointForm(ID_MAIN_FORM);
add(mainForm);
MainObjectListPanel<ConnectorHostType> table = new MainObjectListPanel<ConnectorHostType>(ID_TABLE, ConnectorHostType.class, getQueryOptions()) {
@Override
protected void objectDetailsPerformed(AjaxRequestTarget target, ConnectorHostType host) {
}
@Override
protected UserProfileStorage.TableId getTableId() {
return UserProfileStorage.TableId.PAGE_RESOURCES_CONNECTOR_HOSTS;
}
@Override
protected List<InlineMenuItem> createInlineMenu() {
return createRowActions();
}
@Override
protected List<IColumn<SelectableBean<ConnectorHostType>, String>> createDefaultColumns() {
return PageConnectorHosts.this.initColumns();
}
@Override
protected boolean isCreateNewObjectEnabled() {
return false;
}
@Override
protected boolean isObjectDetailsEnabled(IModel<SelectableBean<ConnectorHostType>> rowModel) {
return false;
}
};
table.setOutputMarkupId(true);
mainForm.add(table);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class ImportReportPopupPanel method initLayout.
protected void initLayout() {
Form<?> mainForm = new MidpointForm<>(ID_MAIN_FORM);
add(mainForm);
FeedbackAlerts feedback = new FeedbackAlerts(ID_POPUP_FEEDBACK);
feedback.setOutputMarkupId(true);
mainForm.add(feedback);
Model<String> nameModel = Model.of("");
TextPanel nameField = new TextPanel(ID_NAME_FOR_DATA, nameModel);
nameField.setOutputMarkupId(true);
mainForm.add(nameField);
Model<String> fileStringModel = Model.of("");
TextAreaPanel fileStringField = new TextAreaPanel(ID_FILE_AS_NAME, fileStringModel, 5);
fileStringField.setOutputMarkupId(true);
mainForm.add(fileStringField);
AjaxSubmitButton importButton = new AjaxSubmitButton(ID_IMPORT_BUTTON, createStringResource("PageReports.button.import")) {
@Override
protected void onSubmit(AjaxRequestTarget target) {
importConfirmPerformed(target, nameModel, fileStringModel);
}
@Override
protected void onError(AjaxRequestTarget target) {
FeedbackAlerts feedback = (FeedbackAlerts) getForm().get(ID_POPUP_FEEDBACK);
target.add(feedback);
}
};
mainForm.add(importButton);
AjaxButton cancelButton = new AjaxButton(ID_CANCEL_BUTTON, createStringResource("userBrowserDialog.button.cancelButton")) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
ImportReportPopupPanel.this.getPageBase().hideMainPopup(target);
}
};
cancelButton.setOutputMarkupId(true);
mainForm.add(cancelButton);
FileUploadField choseFile = new FileUploadField(ID_CHOSE_FILE);
mainForm.add(choseFile);
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class AbstractPageObjectDetails method createDetailsFragment.
protected DetailsFragment createDetailsFragment() {
return new DetailsFragment(ID_DETAILS_VIEW, ID_DETAILS, AbstractPageObjectDetails.this) {
@Override
protected void initFragmentLayout() {
add(initSummaryPanel());
MidpointForm form = new MidpointForm(ID_MAIN_FORM);
form.setMultiPart(true);
add(form);
initButtons(form);
ContainerPanelConfigurationType defaultConfiguration = findDefaultConfiguration();
initMainPanel(defaultConfiguration, form);
form.add(initNavigation());
}
};
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class AbstractPageObjectDetails method replacePanel.
public void replacePanel(ContainerPanelConfigurationType config, AjaxRequestTarget target) {
MidpointForm form = getMainForm();
try {
initMainPanel(config, form);
target.add(form);
target.add(getFeedbackPanel());
} catch (Throwable e) {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Can't instantiate panel based on config\n {}", config.debugDump(), e);
}
error("Cannot instantiate panel, " + e.getMessage());
target.add(getFeedbackPanel());
}
}
use of com.evolveum.midpoint.web.component.form.MidpointForm in project midpoint by Evolveum.
the class InternalsTracesPanel method onInitialize.
protected void onInitialize() {
super.onInitialize();
setOutputMarkupId(true);
Form form = new MidpointForm<>(ID_FORM);
form.setOutputMarkupId(true);
add(form);
ListView<InternalOperationClasses> tracesTable = new ListView<InternalOperationClasses>(ID_TRACES_TABLE, Arrays.asList(InternalOperationClasses.values())) {
private static final long serialVersionUID = 1L;
@Override
protected void populateItem(ListItem<InternalOperationClasses> item) {
InternalOperationClasses operationClass = item.getModelObject();
CheckFormGroup checkFormGroup = new CheckFormGroup(ID_TRACE_TOGGLE, new PropertyModel<>(tracesMap, operationClass.getKey()), createStringResource("InternalOperationClasses." + operationClass.getKey()), LABEL_SIZE, INPUT_SIZE);
item.add(checkFormGroup);
}
};
form.add(tracesTable);
AjaxSubmitButton update = new AjaxSubmitButton(ID_UPDATE_TRACES, createStringResource("PageBase.button.update")) {
private static final long serialVersionUID = 1L;
@Override
protected void onSubmit(AjaxRequestTarget target) {
updateTraces(target);
}
@Override
protected void onError(AjaxRequestTarget target) {
target.add(getPageBase().getFeedbackPanel());
}
};
form.add(update);
}
Aggregations