protected String getRowClassAttribute(RowHolderBase rowHolder) { String rowClass = ""; if (rowHolder.getRow() instanceof UIDataTableBase) { rowClass = ((UIDataTableBase) rowHolder.getRow()).getRowClass(); } return rowClass; }
protected String[] getColumnClasses(RowHolderBase rowHolder) { String[] columnClasses = new String[0]; if (rowHolder.getRow() instanceof UIDataTableBase) { String classes = ((UIDataTableBase) rowHolder.getRow()).getColumnClasses(); if (null != classes) { columnClasses = classes.split(","); } } return columnClasses; }
public void processRows( ResponseWriter writer, FacesContext facesContext, UIComponent component, Object[] options) throws IOException { RowHolderBase rowHolder = createRowHolder(facesContext, component, options); encodeRows(facesContext, rowHolder); if (!rowHolder.hasWalkedOverRows()) { try { encodeFakeRow(facesContext, rowHolder); } catch (IOException e) { throw new FacesException(e); } } else { doCleanup(facesContext, rowHolder); } }
public DataVisitResult process(FacesContext facesContext, Object rowKey, Object argument) { RowHolderBase holder = (RowHolderBase) argument; Row row = holder.getRow(); row.setRowKey(facesContext, rowKey); try { ResponseWriter writer = facesContext.getResponseWriter(); holder.resetProcessCell(); encodeRow(writer, facesContext, holder); } catch (IOException e) { throw new FacesException(e); } holder.nextRow(); return DataVisitResult.CONTINUE; }
protected String getRowClass(RowHolderBase rowHolder) { String styleClass = ""; String[] rowClasses = getRowClasses(rowHolder); if (rowClasses.length > 0) { int styleIndex = rowHolder.getCurrentRow() % rowClasses.length; styleClass = rowClasses[styleIndex]; } return concatClasses(getRowClassAttribute(rowHolder), styleClass); }
protected void encodeRows(FacesContext facesContext, RowHolderBase rowHolder) { rowHolder.getRow().walk(facesContext, this, rowHolder); }