for (String v : VIEW_TYPES) {
viewSelect.addOption((v.equals(getParameterView())), v, message("xmlui.ArtifactBrowser.AbstractSearch.view." + v));
}
}
catch (Exception e) {
throw new WingException("Unable to get view options", e);
}
// Create a control for the number of records to display
Cell rppCell = controlsRow.addCell();
rppCell.addContent(T_rpp);
Select rppSelect = rppCell.addSelect("rpp");
for (int i : RESULTS_PER_PAGE_PROGRESSION) {
rppSelect.addOption((i == getParameterRpp()), i, Integer.toString(i));
}
/*
Cell groupCell = controlsRow.addCell();
try {
// Create a drop down of the different sort columns available
groupCell.addContent(T_group_by);
Select groupSelect = groupCell.addSelect("group_by");
groupSelect.addOption(false, "none", T_group_by_none);
String[] groups = {"publication_grp"};
for (String group : groups) {
groupSelect.addOption(group.equals(getParameterGroup()), group,
message("xmlui.ArtifactBrowser.AbstractSearch.group_by." + group));
}
}
catch (Exception se) {
throw new WingException("Unable to get group options", se);
}
*/
Cell sortCell = controlsRow.addCell();
try {
// Create a drop down of the different sort columns available
sortCell.addContent(T_sort_by);
Select sortSelect = sortCell.addSelect("sort_by");
sortSelect.addOption(false, "score", T_sort_by_relevance);
for (SortOption so : SortOption.getSortOptions()) {
if (so.isVisible()) {
sortSelect.addOption((so.getMetadata().equals(getParameterSortBy())), so.getMetadata(),
message("xmlui.ArtifactBrowser.AbstractSearch.sort_by." + so.getName()));
}
}
}
catch (SortException se) {
throw new WingException("Unable to get sort options", se);
}
// Create a control to changing ascending / descending order
Cell orderCell = controlsRow.addCell();
orderCell.addContent(T_order);