use of com.evolveum.midpoint.web.component.data.TablePanel 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.data.TablePanel 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.data.TablePanel in project midpoint by Evolveum.
the class ObjectSelectionPanel method updateTablePerformed.
public void updateTablePerformed(AjaxRequestTarget target, ObjectQuery query) {
TablePanel table = getTablePanel();
DataTable dataTable = table.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) dataTable.getDataProvider();
provider.setQuery(query);
target.add(this, WebComponentUtil.getPageBase(this).getFeedbackPanel(), table);
}
use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.
the class ObjectSelectionPanel method updateTableByTypePerformed.
public void updateTableByTypePerformed(AjaxRequestTarget target, Class<? extends ObjectType> newType) {
this.objectType = newType;
TablePanel table = getTablePanel();
DataTable dataTable = table.getDataTable();
ObjectDataProvider provider = (ObjectDataProvider) dataTable.getDataProvider();
provider.setType(objectType);
target.add(this, WebComponentUtil.getPageBase(this).getFeedbackPanel(), table);
}
use of com.evolveum.midpoint.web.component.data.TablePanel in project midpoint by Evolveum.
the class AssignmentPreviewDialog method initLayout.
public void initLayout() {
List<IColumn<AssignmentsPreviewDto, String>> columns = initColumns();
ListDataProvider provider = new ListDataProvider(pageBase, data);
WebMarkupContainer content = new WebMarkupContainer(ID_CONTENT);
content.setOutputMarkupId(true);
add(content);
TablePanel table = new TablePanel<>(ID_TABLE, provider, columns);
table.setOutputMarkupId(true);
content.add(table);
AjaxButton addButton = new AjaxButton(ID_BUTTON_ADD, createStringResource("userBrowserDialog.button.selectButton")) {
private static final long serialVersionUID = 1L;
@Override
public void onClick(AjaxRequestTarget target) {
List<AssignmentsPreviewDto> previewDtos = data.getObject();
List<AssignmentsPreviewDto> selectedDtos = new ArrayList<>();
for (AssignmentsPreviewDto dto : previewDtos) {
if (dto.isSelected()) {
selectedDtos.add(dto);
}
}
AssignmentPreviewDialog.this.addButtonClicked(target, selectedDtos);
}
};
addButton.add(new VisibleEnableBehaviour() {
private static final long serialVersionUID = 1L;
@Override
public boolean isVisible() {
return multiselect;
}
});
content.add(addButton);
AjaxButton cancelButton = new AjaxButton(ID_BUTTON_CANCEL, createStringResource("AssignmentPreviewDialog.button.cancel")) {
@Override
public void onClick(AjaxRequestTarget ajaxRequestTarget) {
((PageBase) getPage()).hideMainPopup(ajaxRequestTarget);
}
};
content.add(cancelButton);
}
Aggregations