Search in sources :

Example 11 with HtmlRow

use of org.jmesa.view.html.component.HtmlRow 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();
}
Also used : HtmlTable(org.jmesa.view.html.component.HtmlTable) TableFacadeFactory.createTableFacade(org.jmesa.facade.TableFacadeFactory.createTableFacade) TableFacade(org.jmesa.facade.TableFacade) HtmlRow(org.jmesa.view.html.component.HtmlRow) DateCellEditor(org.jmesa.view.editor.DateCellEditor) HtmlColumn(org.jmesa.view.html.component.HtmlColumn)

Example 12 with HtmlRow

use of org.jmesa.view.html.component.HtmlRow in project OpenClinica by OpenClinica.

the class SDVController method setTitles.

/* Create the titles for the HTML table's rows */
private void setTitles(String[] allTitles, HtmlTable table) {
    HtmlRow row = table.getRow();
    HtmlColumn tempColumn = null;
    for (int i = 0; i < allTitles.length; i++) {
        tempColumn = row.getColumn(i);
        tempColumn.setTitle(allTitles[i]);
    }
}
Also used : HtmlRow(org.jmesa.view.html.component.HtmlRow) HtmlColumn(org.jmesa.view.html.component.HtmlColumn)

Aggregations

HtmlColumn (org.jmesa.view.html.component.HtmlColumn)12 HtmlRow (org.jmesa.view.html.component.HtmlRow)12 HtmlTable (org.jmesa.view.html.component.HtmlTable)6 TableFacade (org.jmesa.facade.TableFacade)4 TableFacadeFactory.createTableFacade (org.jmesa.facade.TableFacadeFactory.createTableFacade)4 ResourceBundle (java.util.ResourceBundle)3 DefaultActionsEditor (org.akaza.openclinica.control.DefaultActionsEditor)2 SDVToolbar (org.akaza.openclinica.controller.helper.table.SDVToolbar)2 MatcherKey (org.jmesa.core.filter.MatcherKey)2 DateCellEditor (org.jmesa.view.editor.DateCellEditor)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Locale (java.util.Locale)1 RuleActionBean (org.akaza.openclinica.domain.rule.action.RuleActionBean)1 SDVUtil (org.akaza.openclinica.web.table.sdv.SDVUtil)1 Row (org.jmesa.view.component.Row)1 BasicCellEditor (org.jmesa.view.editor.BasicCellEditor)1 CellEditor (org.jmesa.view.editor.CellEditor)1 HtmlBuilder (org.jmesa.view.html.HtmlBuilder)1