use of org.akaza.openclinica.web.domain.EntityBeanTable in project OpenClinica by OpenClinica.
the class ViewRuleAssignmentServlet method processRequest.
@Override
public void processRequest() throws Exception {
FormProcessor fp = new FormProcessor(request);
List<RuleSetBean> ruleSets = getRuleSetService().getRuleSetsByStudy(currentStudy);
ruleSets = getRuleSetService().filterByStatusEqualsAvailableOnlyRuleSetRules(ruleSets);
EntityBeanTable table = fp.getWebEntityBeanTable();
ArrayList allRows = ViewRuleAssignmentRow.generateRowsFromBeans((ArrayList) ruleSets);
String[] columns = { resword.getString("rule_study_event_definition"), resword.getString("CRF_name"), resword.getString("rule_group_label"), resword.getString("rule_item_name"), resword.getString("rule_rules"), resword.getString("rule_ref_oid"), resword.getString("rule_action_type"), resword.getString("actions") };
table.setColumns(new ArrayList(Arrays.asList(columns)));
table.hideColumnLink(4);
table.hideColumnLink(5);
table.hideColumnLink(6);
table.setQuery("ViewRuleAssignment", new HashMap());
// table.addLink(resword.getString("rule_import_rule"), "ImportRule");
table.addLink(resword.getString("test_rule_title"), "TestRule");
table.setRows(allRows);
table.computeDisplay();
request.setAttribute("table", table);
if (request.getParameter("read") != null && request.getParameter("read").equals("true")) {
request.setAttribute("readOnly", true);
}
forwardPage(Page.VIEW_RULE_SETS);
}
Aggregations