use of org.jmesa.view.editor.DateCellEditor in project OpenClinica by OpenClinica.
the class ListNotesTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("studySubject.label", "discrepancyNoteBean.disType", "discrepancyNoteBean.resolutionStatus", "siteId", "discrepancyNoteBean.createdDate", "discrepancyNoteBean.updatedDate", "age", "days", "eventName", "eventStartDate", "crfName", "crfStatus", "entityName", "entityValue", "discrepancyNoteBean.entityType", "discrepancyNoteBean.description", "discrepancyNoteBean.detailedNotes", "numberOfNotes", "discrepancyNoteBean.user", "discrepancyNoteBean.owner", "actions");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("studySubject.label"), resword.getString("study_subject_ID"), null, null, true, true);
configureColumn(row.getColumn("siteId"), resword.getString("site_id"), null, null, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.createdDate"), resword.getString("date_created"), new DateCellEditor(getDateFormat()), null, true, true);
configureColumn(row.getColumn("discrepancyNoteBean.updatedDate"), resword.getString("date_updated"), new DateCellEditor(getDateFormat()), null, true, false);
configureColumn(row.getColumn("eventStartDate"), resword.getString("event_date"), new DateCellEditor(getDateFormat()), null, false, false);
configureColumn(row.getColumn("eventName"), resword.getString("event_name"), null, null, true, false);
configureColumn(row.getColumn("crfName"), resword.getString("CRF"), null, null, true, false);
configureColumn(row.getColumn("crfStatus"), resword.getString("CRF_status"), null, null, false, false);
configureColumn(row.getColumn("entityName"), resword.getString("entity_name"), new EntityNameCellEditor(), null, true, false);
configureColumn(row.getColumn("entityValue"), resword.getString("entity_value"), null, null, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.description"), resword.getString("description"), null, null, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.detailedNotes"), resword.getString("detailed_notes"), null, null, false, false);
configureColumn(row.getColumn("numberOfNotes"), resword.getString("of_notes"), null, null, false, false);
configureColumn(row.getColumn("discrepancyNoteBean.user"), resword.getString("assigned_user"), new AssignedUserCellEditor(), null, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.resolutionStatus"), resword.getString("resolution_status"), new ResolutionStatusCellEditor(), resolutionStatusDropdown, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.disType"), resword.getString("type"), new DiscrepancyNoteTypeCellEditor(), discrepancyNoteTypeDropdown, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.entityType"), resword.getString("entity_type"), null, null, true, false);
configureColumn(row.getColumn("discrepancyNoteBean.owner"), resword.getString("owner"), new OwnerCellEditor(), null, false, false);
String actionsHeader = resword.getString("actions") + "           ";
configureColumn(row.getColumn("actions"), actionsHeader, new ActionsCellEditor(), new DefaultActionsEditor(locale), true, false);
configureColumn(row.getColumn("age"), resword.getString("days_open"), null, null);
configureColumn(row.getColumn("days"), resword.getString("days_since_updated"), null, null);
}
use of org.jmesa.view.editor.DateCellEditor in project OpenClinica by OpenClinica.
the class SDVUtil method formatColumns.
public void formatColumns(HtmlTable table, String[] columnNames, HttpServletRequest request) {
Locale locale = ResourceBundleProvider.localeMap.get(Thread.currentThread());
if (locale == null) {
ResourceBundleProvider.updateLocale(LocaleResolver.getLocale(request));
}
ResourceBundle bundle = ResourceBundleProvider.getFormatBundle();
String format = bundle.getString("date_time_format_string");
HtmlRow row = table.getRow();
HtmlColumn column = null;
for (String colName : columnNames) {
column = row.getColumn(colName);
if (column != null) {
column.getCellRenderer().setCellEditor(new DateCellEditor(format));
}
}
}
use of org.jmesa.view.editor.DateCellEditor in project OpenClinica by OpenClinica.
the class AuditUserLoginTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("userName", "loginAttemptDate", "loginStatus", "details", "actions");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("userName"), "User Name", null, null);
configureColumn(row.getColumn("loginAttemptDate"), "Attempt Date", new DateCellEditor("yyyy-MM-dd HH:mm:ss"), null);
configureColumn(row.getColumn("loginStatus"), "Status", null, new AvailableDroplistFilterEditor());
configureColumn(row.getColumn("details"), "Details", null, null);
String actionsHeader = resword.getString("actions") + "           ";
configureColumn(row.getColumn("actions"), actionsHeader, new ActionsCellEditor(), new DefaultActionsEditor(locale), true, false);
}
use of org.jmesa.view.editor.DateCellEditor in project OpenClinica by OpenClinica.
the class AuditDatabaseServlet method renderAuditDatabaseTable.
private String renderAuditDatabaseTable(List<DatabaseChangeLogBean> databaseChangeLogs) {
// Collection<StudyRowContainer> items = getStudyRows(studyBeans);
TableFacade tableFacade = createTableFacade("databaseChangeLogs", request);
tableFacade.setColumnProperties("id", "author", "fileName", "dataExecuted", "md5Sum", "description", "comments", "tag", "liquibase");
tableFacade.setItems(databaseChangeLogs);
// Fix column titles
HtmlTable table = (HtmlTable) tableFacade.getTable();
table.setCaption("");
HtmlRow row = table.getRow();
HtmlColumn id = row.getColumn("id");
id.setTitle("Id");
HtmlColumn author = row.getColumn("author");
author.setTitle("Author");
HtmlColumn fileName = row.getColumn("fileName");
fileName.setTitle("File Name");
HtmlColumn dataExecuted = row.getColumn("dataExecuted");
dataExecuted.setTitle("Date Executed");
dataExecuted.getCellRenderer().setCellEditor(new DateCellEditor("yyyy-MM-dd hh:mm:ss"));
HtmlColumn md5Sum = row.getColumn("md5Sum");
md5Sum.setTitle("md5 sum");
HtmlColumn description = row.getColumn("description");
description.setTitle("Description");
HtmlColumn comments = row.getColumn("comments");
comments.setTitle("Comments");
HtmlColumn tag = row.getColumn("tag");
tag.setTitle("Tag");
HtmlColumn liquibase = row.getColumn("liquibase");
liquibase.setTitle("Liquibase");
return tableFacade.render();
}
use of org.jmesa.view.editor.DateCellEditor in project OpenClinica by OpenClinica.
the class ListSubjectTableFactory method configureColumns.
@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
tableFacade.setColumnProperties("subject.uniqueIdentifier", "studySubjectIdAndStudy", "subject.gender", "subject.createdDate", "subject.owner", "subject.updatedDate", "subject.updater", "subject.status", "actions");
Row row = tableFacade.getTable().getRow();
configureColumn(row.getColumn("subject.uniqueIdentifier"), resword.getString("person_ID"), null, null);
configureColumn(row.getColumn("studySubjectIdAndStudy"), resword.getString("Protocol_Study_subject_IDs"), null, null, true, false);
configureColumn(row.getColumn("subject.gender"), resword.getString("gender"), null, null);
configureColumn(row.getColumn("subject.createdDate"), resword.getString("date_created"), new DateCellEditor(getDateFormat()), null);
configureColumn(row.getColumn("subject.owner"), resword.getString("owner"), new OwnerCellEditor(), null, true, false);
configureColumn(row.getColumn("subject.updatedDate"), resword.getString("date_updated"), new DateCellEditor(getDateFormat()), null);
configureColumn(row.getColumn("subject.updater"), resword.getString("last_updated_by"), new UpdaterCellEditor(), null, true, false);
configureColumn(row.getColumn("subject.status"), resword.getString("status"), new StatusCellEditor(), new StatusDroplistFilterEditor());
configureColumn(row.getColumn("actions"), resword.getString("actions") + // " "
"                                 ", new ActionsCellEditor(), new DefaultActionsEditor(locale), true, false);
// >> tbh #4003, 08/2009
}
Aggregations