public OrienteerCloudOModulesConfigurationsPanel(String id, final OArtifactsModalWindowPage windowPage, ISortableDataProvider<OArtifact, String> provider) {
super(id);
setOutputMarkupPlaceholderTag(true);
Form orienteerModulesForm = new Form("orienteerCloudOModulesConfigsForm");
Label feedback = new Label("feedback");
feedback.setVisible(false);
feedback.setOutputMarkupPlaceholderTag(true);
IModel<DisplayMode> modeModel = DisplayMode.VIEW.asModel();
List<IColumn<OArtifact, String>> columns = getColumns(modeModel);
OrienteerDataTable<OArtifact, String> table = new OrienteerDataTable<>("availableModules", columns, provider, 10);
table.addCommand(new AjaxCommand<OArtifact>(new ResourceModel(BACK_BUT), table) {
@Override
public void onClick(Optional<AjaxRequestTarget> targetOptional) {
windowPage.showOrienteerModulesPanel(false);
targetOptional.ifPresent(target->target.add(windowPage));
}
@Override
protected void onInstantiation() {
super.onInstantiation();
setIcon(FAIconType.angle_left);
setBootstrapType(BootstrapType.PRIMARY);
setAutoNotify(false);
}
});
table.addCommand(new InstallOModuleCommand(table, windowPage, false, feedback));
table.addCommand(new InstallOModuleCommand(table, windowPage,true, feedback));
orienteerModulesForm.add(table);
orienteerModulesForm.add(feedback);
add(orienteerModulesForm);
}