use of com.evolveum.midpoint.web.component.AjaxButton in project midpoint by Evolveum.
the class DebugButtonPanel method initLayout.
@Override
protected void initLayout() {
AjaxButton export = new AjaxButton(ID_EXPORT, createStringResource("DebugButtonPanel.button.export")) {
@Override
public void onClick(AjaxRequestTarget target) {
exportPerformed(target, DebugButtonPanel.this.getModel());
}
};
add(export);
AjaxButton delete = new AjaxButton(ID_DELETE, createStringResource("DebugButtonPanel.button.delete")) {
@Override
public void onClick(AjaxRequestTarget target) {
deletePerformed(target, DebugButtonPanel.this.getModel());
}
};
add(delete);
}
use of com.evolveum.midpoint.web.component.AjaxButton in project midpoint by Evolveum.
the class ObjectSelectionPanel method initLayout.
public void initLayout(PageBase pageBase) {
Form searchForm = new Form(ID_SEARCH_FORM);
searchForm.setOutputMarkupId(true);
add(searchForm);
searchForm.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return context.isSearchEnabled();
}
});
BasicSearchPanel<ObjectSearchDto> basicSearch = new BasicSearchPanel<ObjectSearchDto>(ID_BASIC_SEARCH) {
@Override
protected IModel<String> createSearchTextModel() {
return new PropertyModel<>(searchModel, ObjectSearchDto.F_SEARCH_TEXT);
}
@Override
protected void searchPerformed(AjaxRequestTarget target) {
ObjectSelectionPanel.this.searchPerformed(target);
}
@Override
protected void clearSearchPerformed(AjaxRequestTarget target) {
ObjectSelectionPanel.this.clearSearchPerformed(target);
}
};
searchForm.add(basicSearch);
add(context.createExtraContentContainer(ID_EXTRA_CONTENT_CONTAINER, this));
List<IColumn<SelectableBean<ObjectType>, String>> columns = initColumns();
ObjectDataProvider provider = new ObjectDataProvider(pageBase, this.objectType);
provider.setQuery(context.getDataProviderQuery());
provider.setOptions(context.getDataProviderOptions());
TablePanel table = new TablePanel<>(ID_TABLE, provider, columns);
table.setOutputMarkupId(true);
addOrReplace(table);
AjaxButton cancelButton = new AjaxButton(ID_BUTTON_CANCEL, createStringResource("chooseTypeDialog.button.cancel")) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
modalWindow.close(ajaxRequestTarget);
}
};
add(cancelButton);
}
use of com.evolveum.midpoint.web.component.AjaxButton in project midpoint by Evolveum.
the class LoggingConfigPanel method initLoggers.
private void initLoggers() {
initRoot();
ISortableDataProvider<LoggerConfiguration, String> provider = new ListDataProvider<>(this, new PropertyModel<List<LoggerConfiguration>>(getModel(), "loggers"));
TablePanel table = new TablePanel<>(ID_LOGGERS_TABLE, provider, initLoggerColumns());
table.setOutputMarkupId(true);
table.setShowPaging(true);
add(table);
AjaxButton addStandardLogger = new AjaxButton(ID_BUTTON_ADD_STANDARD_LOGGER, createStringResource("LoggingConfigPanel.button.addStandardLogger")) {
@Override
public void onClick(AjaxRequestTarget target) {
addStandardLoggerPerformed(target);
}
};
add(addStandardLogger);
AjaxButton addComponentLogger = new AjaxButton("addComponentLogger", createStringResource("LoggingConfigPanel.button.addComponentLogger")) {
@Override
public void onClick(AjaxRequestTarget target) {
addComponentLoggerPerformed(target);
}
};
add(addComponentLogger);
AjaxButton addClassLogger = new AjaxButton("addClassLogger", createStringResource("LoggingConfigPanel.button.addClassLogger")) {
@Override
public void onClick(AjaxRequestTarget target) {
addClassLoggerPerformed(target);
}
};
add(addClassLogger);
AjaxButton deleteLogger = new AjaxButton("deleteLogger", createStringResource("LoggingConfigPanel.button.deleteLogger")) {
@Override
public void onClick(AjaxRequestTarget target) {
deleteLoggerPerformed(target);
}
};
add(deleteLogger);
}
use of com.evolveum.midpoint.web.component.AjaxButton in project midpoint by Evolveum.
the class LoggingConfigPanel method initAppenders.
private void initAppenders() {
ISortableDataProvider<AppenderConfiguration, String> provider = new ListDataProvider<>(this, new PropertyModel<List<AppenderConfiguration>>(getModel(), LoggingDto.F_APPENDERS));
TablePanel table = new TablePanel<>(ID_TABLE_APPENDERS, provider, initAppenderColumns());
table.setOutputMarkupId(true);
table.setShowPaging(false);
add(table);
AjaxButton addConsoleAppender = new AjaxButton(ID_BUTTON_ADD_CONSOLE_APPENDER, createStringResource("LoggingConfigPanel.button.addConsoleAppender")) {
@Override
public void onClick(AjaxRequestTarget target) {
addConsoleAppenderPerformed(target);
}
};
add(addConsoleAppender);
AjaxButton addFileAppender = new AjaxButton(ID_BUTTON_ADD_FILE_APPENDER, createStringResource("LoggingConfigPanel.button.addFileAppender")) {
@Override
public void onClick(AjaxRequestTarget target) {
addFileAppenderPerformed(target);
}
};
add(addFileAppender);
AjaxButton deleteAppender = new AjaxButton(ID_BUTTON_DELETE_APPENDER, createStringResource("LoggingConfigPanel.button.deleteAppender")) {
@Override
public void onClick(AjaxRequestTarget target) {
deleteAppenderPerformed(target);
}
};
add(deleteAppender);
}
use of com.evolveum.midpoint.web.component.AjaxButton in project midpoint by Evolveum.
the class ReportCreateHandlerPanel method initLayout.
private void initLayout(final PageTaskEdit parentPage) {
final AjaxDownloadBehaviorFromStream ajaxDownloadBehavior = new AjaxDownloadBehaviorFromStream() {
@Override
protected InputStream initStream() {
String outputOid = getModelObject().getReportOutputOid();
if (outputOid == null) {
return null;
}
Task task = parentPage.createSimpleTask(OPERATION_LOAD_REPORT_OUTPUT);
PrismObject<ReportOutputType> reportObject = WebModelServiceUtils.loadObject(ReportOutputType.class, outputOid, parentPage, task, task.getResult());
if (reportObject != null) {
return PageCreatedReports.createReport(reportObject.asObjectable(), this, parentPage);
} else {
return null;
}
}
};
parentPage.getForm().add(ajaxDownloadBehavior);
WebMarkupContainer reportParametersContainer = new WebMarkupContainer(ID_REPORT_PARAMETERS_CONTAINER);
TextArea reportParameters = new TextArea<>(ID_REPORT_PARAMETERS, new PropertyModel<>(getModel(), ReportCreateHandlerDto.F_REPORT_PARAMS));
reportParameters.setEnabled(false);
reportParametersContainer.add(reportParameters);
add(reportParametersContainer);
WebMarkupContainer downloadContainer = new WebMarkupContainer(ID_DOWNLOAD_CONTAINER);
AjaxButton download = new AjaxButton(ID_DOWNLOAD) {
@Override
public void onClick(AjaxRequestTarget target) {
ajaxDownloadBehavior.initiate(target);
}
};
downloadContainer.add(download);
downloadContainer.add(new VisibleEnableBehaviour() {
@Override
public boolean isVisible() {
return getModelObject().getReportOutputOid() != null;
}
});
add(downloadContainer);
}
Aggregations