Exemplo n.º 1
0
  public Object build(TableModel model, Collection studies, String title, String action)
      throws Exception {

    Table table = model.getTableInstance();
    table.setTitle(title);

    table.setAction(model.getContext().getContextPath() + action);
    table.setTableId("studies");
    table.setItems(studies);
    table.setOnInvokeAction("buildTable('studies')");
    table.setShowPagination(false);
    table.setSortable(true);
    table.setShowExports(false);
    table.setImagePath(model.getContext().getContextPath() + "/images/table/*.gif");
    model.addTable(table);

    Row row = model.getRowInstance();
    row.setInterceptor("edu.duke.cabig.c3pr.web.ajax.StudyRowInterceptor");
    model.addRow(row);

    Column columnTitle = model.getColumnInstance();
    columnTitle.setTitle("Short Title");
    columnTitle.setProperty("shortTitleText");
    model.addColumn(columnTitle);

    Column columnIdentifier = model.getColumnInstance();
    columnIdentifier.setProperty("primaryIdentifier");
    model.addColumn(columnIdentifier);

    Column columnPhase = model.getColumnInstance();
    columnPhase.setTitle("Phase");
    columnPhase.setProperty("phaseCode");
    model.addColumn(columnPhase);

    Column columnStatus = model.getColumnInstance();
    columnStatus.setTitle("Status");
    columnStatus.setProperty("coordinatingCenterStudyStatus.code");
    model.addColumn(columnStatus);

    Column columnCompanion = model.getColumnInstance();
    columnCompanion.setTitle("Companion Indicator");
    columnCompanion.setProperty("companionIndicatorDisplayValue");
    model.addColumn(columnCompanion);

    // Column columnSite = model.getColumnInstance();
    // columnSite.setTitle("Sites");
    // columnSite.setProperty("printStudySites");
    // model.addColumn(columnSite);

    return model.assemble();
  }
Exemplo n.º 2
0
  public void modifyRowAttributes(TableModel model, Row row) {
    this.row = row;

    row.addAttribute(
        TDTableConstants.ON_DOUBLE_CLICK,
        TagUtils.evaluateExpressionAsString(
            TDTableConstants.ON_DOUBLE_CLICK, this.ondblclick, this, pageContext));
  }
Exemplo n.º 3
0
 public int doAfterBody() throws JspException {
   row.addAttribute(TDTableConstants.OTHER_ATTRIBUTES, getAttributesAsString());
   return SKIP_BODY;
 }