Search in sources :

Example 6 with Row

use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.

the class DiscNotesSubjectStatisticsFactory method configureColumns.

@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
    //resword = ResourceBundleProvider.getWordsBundle(locale);
    //resformat = ResourceBundleProvider.getFormatBundle(locale);
    tableFacade.setColumnProperties(columnNames);
    Row row = tableFacade.getTable().getRow();
    HashMap<Object, Map> items = (HashMap<Object, Map>) getDiscrepancyMap();
    Set theKeys = items.keySet();
    Iterator theKeysItr = theKeys.iterator();
    configureColumn(row.getColumn(columnNames[0]), "_", null, null);
    configureColumn(row.getColumn(columnNames[1]), theKeysItr.next().toString(), null, null);
    configureColumn(row.getColumn(columnNames[2]), theKeysItr.next().toString(), null, null);
    configureColumn(row.getColumn(columnNames[3]), theKeysItr.next().toString(), null, null);
    configureColumn(row.getColumn(columnNames[4]), theKeysItr.next().toString(), null, null);
    configureColumn(row.getColumn(columnNames[5]), "Totals", null, null);
// study event definition columns
//String actionsHeader = resword.getString("rule_actions") + "&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;";
//configureColumn(row.getColumn(columnNames[columnNames.length - 1]), "Summary Statistics", null, null, false,
//       false);					
}
Also used : FilterSet(org.jmesa.limit.FilterSet) Set(java.util.Set) SortSet(org.jmesa.limit.SortSet) HashMap(java.util.HashMap) Iterator(java.util.Iterator) Row(org.jmesa.view.component.Row) HashMap(java.util.HashMap) Map(java.util.Map)

Example 7 with Row

use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.

the class ListStudySubjectTableFactory method configureColumns.

@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
    resword = ResourceBundleProvider.getWordsBundle(locale);
    resformat = ResourceBundleProvider.getFormatBundle(locale);
    tableFacade.setColumnProperties(columnNames);
    Row row = tableFacade.getTable().getRow();
    int index = 0;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("study_subject_ID"), null, null);
    ++index;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("subject_status"), new StatusCellEditor(), new StatusDroplistFilterEditor());
    ++index;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("site_id"), null, null);
    ++index;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("rule_oid"), null, null);
    ++index;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("gender"), null, null, true, false);
    ++index;
    configureColumn(row.getColumn(columnNames[index]), resword.getString("secondary_ID"), null, null);
    ++index;
    // group class columns
    for (int i = index; i < index + studyGroupClasses.size(); i++) {
        StudyGroupClassBean studyGroupClass = studyGroupClasses.get(i - index);
        // configureColumn(row.getColumn(columnNames[i]),
        // studyGroupClass.getName(), new
        // StudyGroupClassCellEditor(studyGroupClass), null, false, false);
        configureColumn(row.getColumn(columnNames[i]), studyGroupClass.getName(), new StudyGroupClassCellEditor(studyGroupClass), new SubjectGroupClassDroplistFilterEditor(studyGroupClass), true, false);
    }
    // study event definition columns
    for (int i = index + studyGroupClasses.size(); i < columnNames.length - 1; i++) {
        StudyEventDefinitionBean studyEventDefinition = studyEventDefinitions.get(i - (index + studyGroupClasses.size()));
        configureColumn(row.getColumn(columnNames[i]), studyEventDefinition.getName(), new StudyEventDefinitionMapCellEditor(), new SubjectEventStatusDroplistFilterEditor(), true, false);
    }
    String actionsHeader = resword.getString("rule_actions") + "&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;";
    configureColumn(row.getColumn(columnNames[columnNames.length - 1]), actionsHeader, new ActionsCellEditor(), new DefaultActionsEditor(locale), true, false);
}
Also used : StudyEventDefinitionBean(org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean) StudyGroupClassBean(org.akaza.openclinica.bean.managestudy.StudyGroupClassBean) DefaultActionsEditor(org.akaza.openclinica.control.DefaultActionsEditor) Row(org.jmesa.view.component.Row)

Example 8 with Row

use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.

the class ViewRuleAssignmentTableFactory method configureExportColumns.

@Override
protected void configureExportColumns(TableFacade tableFacade, Locale locale) {
    tableFacade.setColumnProperties(columnNames);
    Row row = tableFacade.getTable().getRow();
    int index = 0;
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_run_schedule"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_run_time"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_target"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_study_event"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_crf") + "&#160;&#160;&#160;&#160;&#160;", null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_version"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_group"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_item_name"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_name"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_oid"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_status"), new StatusCellEditor(), new StatusDroplistFilterEditor());
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_rule_description"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_expression"), null, null);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_crf_validations"), new ValidationsValueCellEditor(true), null, false, false);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_execute_on"), new ExecuteOnCellEditor(true), new ExpressionEvaluatesToDroplistFilterEditor(), true, false);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_action_type"), new ActionTypeCellEditor(true), new ActionTypeDroplistFilterEditor(), true, false);
    configureColumn(row.getColumn(columnNames[index++]), resword.getString("view_rule_assignment_action_summary"), new ActionSummaryCellEditor(true), null, true, false);
}
Also used : Row(org.jmesa.view.component.Row)

Example 9 with Row

use of org.jmesa.view.component.Row in project OpenClinica by OpenClinica.

the class SubjectIdSDVFactory method configureColumns.

@Override
protected void configureColumns(TableFacade tableFacade, Locale locale) {
    tableFacade.setColumnProperties("sdvStatus", "studySubjectId", "siteId", "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF", "actions");
    resword = ResourceBundleProvider.getWordsBundle(locale);
    Row row = tableFacade.getTable().getRow();
    SDVUtil sdvUtil = new SDVUtil();
    String[] allTitles = new String[] { resword.getString("SDV_status"), resword.getString("study_subject_ID"), resword.getString("site_id"), resword.getString("person_ID"), resword.getString("study_subject_status"), resword.getString("group"), resword.getString("num_CRFs_completed"), resword.getString("num_CRFs_SDV"), resword.getString("total_events_CRF"), resword.getString("actions") };
    sdvUtil.setTitles(allTitles, (HtmlTable) tableFacade.getTable());
    sdvUtil.turnOffFilters(tableFacade, new String[] { "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF", "actions" });
    sdvUtil.turnOffSorts(tableFacade, new String[] { "sdvStatus", "studySubjectId", "siteId", "personId", "studySubjectStatus", "group", "numberCRFComplete", "numberOfCRFsSDV", "totalEventCRF" });
    sdvUtil.setHtmlCellEditors(tableFacade, new String[] { "sdvStatus", "actions" }, false);
    HtmlColumn sdvStatus = ((HtmlRow) row).getColumn("sdvStatus");
    sdvStatus.getFilterRenderer().setFilterEditor(new SdvStatusFilter());
    String actionsHeader = resword.getString("rule_actions") + "&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;";
    configureColumn(row.getColumn("actions"), actionsHeader, sdvUtil.getCellEditorNoEscapes(), new DefaultActionsEditor(locale), true, false);
}
Also used : DefaultActionsEditor(org.akaza.openclinica.control.DefaultActionsEditor) HtmlRow(org.jmesa.view.html.component.HtmlRow) Row(org.jmesa.view.component.Row) HtmlRow(org.jmesa.view.html.component.HtmlRow) HtmlColumn(org.jmesa.view.html.component.HtmlColumn)

Example 10 with Row

use of org.jmesa.view.component.Row 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);
}
Also used : SDVUtil(org.akaza.openclinica.web.table.sdv.SDVUtil) DefaultActionsEditor(org.akaza.openclinica.control.DefaultActionsEditor) Row(org.jmesa.view.component.Row)

Aggregations

Row (org.jmesa.view.component.Row)20 DefaultActionsEditor (org.akaza.openclinica.control.DefaultActionsEditor)11 DateCellEditor (org.jmesa.view.editor.DateCellEditor)5 HtmlTableRenderer (org.jmesa.view.html.renderer.HtmlTableRenderer)4 List (java.util.List)2 CRFBean (org.akaza.openclinica.bean.admin.CRFBean)2 EventDefinitionCRFBean (org.akaza.openclinica.bean.managestudy.EventDefinitionCRFBean)2 StudyEventDefinitionBean (org.akaza.openclinica.bean.managestudy.StudyEventDefinitionBean)2 StudyGroupClassBean (org.akaza.openclinica.bean.managestudy.StudyGroupClassBean)2 EventCRFBean (org.akaza.openclinica.bean.submit.EventCRFBean)2 HtmlColumn (org.jmesa.view.html.component.HtmlColumn)2 HtmlRow (org.jmesa.view.html.component.HtmlRow)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 Map (java.util.Map)1 Set (java.util.Set)1 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)1 SDVUtil (org.akaza.openclinica.web.table.sdv.SDVUtil)1 FilterSet (org.jmesa.limit.FilterSet)1