super(myWControl);
}
private void init(String selectButtonLabel, UserRequest ureq, boolean withCancel, boolean enableDirectLaunch, String[] limitTypes) {
translator = new PackageTranslator(PACKAGE, ureq.getLocale());
Roles roles = ureq.getUserSession().getRoles();
vc = new VelocityContainer("reposearch", VELOCITY_ROOT + "/search.html", translator, this);
searchForm = new SearchForm("searchform", translator, withCancel, roles.isOLATAdmin(), limitTypes);
searchForm.addListener(this);
searchForm.setVisible(false);
vc.put("searchform",searchForm);
TableGuiConfiguration tableConfig = new TableGuiConfiguration();
if (selectButtonLabel != null) tableConfig.setPreferencesOffered(true, "repositorySearchResult");
tableCtr = new TableController(tableConfig, ureq, getWindowControl(), translator, this, true);
repoTableModel = new RepositoryTableModel(translator);
repoTableModel.addColumnDescriptors(tableCtr, selectButtonLabel, enableDirectLaunch);
tableCtr.setTableDataModel(repoTableModel);
tableCtr.setSortColumn(1, true);
vc.put("repotable", tableCtr.getInitialComponent());
vc.contextPut("isAuthor", Boolean.valueOf(roles.isAuthor()));
vc.contextPut("withCancel", new Boolean(withCancel));
enableBackToSearchFormLink(false); // default, must be enabled explicitly
enableSearchforAllReferencalbeInSearchForm(false); // default
setInitialComponent(vc);
}