use of org.akaza.openclinica.web.table.sdv.SDVUtil in project OpenClinica by OpenClinica.
the class ScheduledJobTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("datasetId", "fireTime", "exportFileName", "jobStatus", "action");
// TODO the following is throwing null pointer, check later
resword = ResourceBundleProvider.getWordsBundle(locale);
Row row = tableFacade.getTable().getRow();
String[] allTitles = new String[] { "DataSet Name", "Fire Time", "Export File", "Job Status", "Actions" };
// TODO check if this is viable
SDVUtil sdvUtil = new SDVUtil();
sdvUtil.setTitles(allTitles, (HtmlTable) tableFacade.getTable());
// HtmlColumn sdvStatus = ((HtmlRow) row).getColumn("checkbox");
// sdvStatus.getFilterRenderer().setFilterEditor(new SdvStatusFilter());
sdvUtil.setHtmlCellEditors(tableFacade, new String[] { "action" }, false);
configureColumn(row.getColumn("action"), "Actions", sdvUtil.getCellEditorNoEscapes(), new DefaultActionsEditor(locale), true, false);
}
use of org.akaza.openclinica.web.table.sdv.SDVUtil in project OpenClinica by OpenClinica.
the class ViewCRFServlet method renderStudiesTable.
/*
* Create a JMesa-based table for showing the studies associated with a CRF.
*/
private String renderStudiesTable(List<StudyBean> studyBeans) {
Collection<StudyRowContainer> items = getStudyRows(studyBeans);
TableFacade tableFacade = createTableFacade("studies", request);
tableFacade.setColumnProperties("name", "uniqueProtocolid", "actions");
tableFacade.setItems(items);
// Fix column titles
HtmlTable table = (HtmlTable) tableFacade.getTable();
// i18n caption; TODO: convert to Spring messages
/*
* ResourceBundle resourceBundle = ResourceBundle.getBundle("org.akaza.openclinica.i18n.words",
* LocaleResolver.getLocale(request));
* String captionText = resourceBundle.getString("studies_using_crf");
* if (captionText == null || "".equalsIgnoreCase(captionText)) {
* captionText = "Studies Using this CRF for Data Entry";
* }
* table.setCaption(captionText);
*/
HtmlRow row = table.getRow();
SDVUtil sDVUtil = new SDVUtil();
String[] colNames = new String[] { "name", "uniqueProtocolid", "actions" };
sDVUtil.setHtmlCellEditors(tableFacade, colNames, true);
HtmlColumn firstName = row.getColumn("name");
firstName.setTitle("Study Name");
HtmlColumn protocol = row.getColumn("uniqueProtocolid");
protocol.setTitle("Unique Protocol Id");
HtmlColumn actions = row.getColumn("actions");
actions.setTitle("Actions");
return tableFacade.render();
}
Aggregations