Package org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table

Examples of org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.RowData


    // renders a whole bunch of <TR>...</TR> elements, one for each row in the
    // table, and additional ones for any disclosed-details rows
    //
    // 1. Gather all the data we need to render
    //
    final RowData rowData = tContext.getRowData();
    final UIComponent detail = tContext.getDetail();
    final RenderStage renderStage = tContext.getRenderStage();
    TableUtils.RowLoop loop = new TableUtils.RowLoop() {
      @Override
      protected void processRowImpl(FacesContext fc, CollectionComponent tableBase)
        throws IOException
      {
        ResponseWriter writer = fc.getResponseWriter();
        // compute all the rowSpans for the current row:
        rowData.setCurrentRowSpan(-1);
        //reset
        renderStage.setStage(RenderStage.START_ROW_STAGE);
        renderSingleRow(fc, arc, tContext, (UIComponent) tableBase);
        renderStage.setStage(RenderStage.DATA_STAGE);
        // render each of the individual rows in the rowSpan:
        for (int i = 0, sz = rowData.getCurrentRowSpan();  i < sz;  i++)
        {
          // start the row
          writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
          renderSingleRow(fc, arc, tContext, (UIComponent) tableBase);
          rowData.incCurrentSubRow();
          // end the row
          writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
        }
        // if necessary, render a detail row
        if ((detail != null)&&
View Full Code Here


    TableRenderingContext trc,
    UIComponent           component,
    FacesBean bean) throws IOException
  {
    TreeTableRenderingContext ttrc = (TreeTableRenderingContext) trc;
    final RowData rowData = trc.getRowData();
    boolean isEmptyTable  = rowData.isEmptyTable();

    // render all the table content rows
    if (isEmptyTable)
      _renderEmptyTableRow(context, arc, ttrc);
    else
View Full Code Here

    if (colData.useSeparateRows(physicalIndex))
    {
      // if so, then the number of rows it spans is the number of visible
      // children it has:
      int kids = getRenderedChildCount(column);
      RowData rowData = tContext.getRowData();
      rowData.setCurrentRowSpan(kids);
    }
    // the default is to span just one row.
  }
View Full Code Here

    TableRenderingContext tContext,
    UIComponent           column)
    throws IOException
  {
    ColumnData colData = tContext.getColumnData();
    RowData rowData = tContext.getRowData();
    final int physicalIndex  = colData.getPhysicalColumnIndex();
    final int subRow = rowData.getCurrentSubRow();
    // this is the row span for the entire row:
    final int currentRowSpan = rowData.getCurrentRowSpan();

    // check to see if each cell in this column comprises of multiple rows:
    if (colData.useSeparateRows(physicalIndex))
      handleSeparateRows:
    {
View Full Code Here

    FacesContext context,
    TableRenderingContext tContext) throws IOException
  {
    if (tContext.isExplicitHeaderIDMode())
    {
      RowData rowData = tContext.getRowData();
      String rowID = rowData.getCurrentRowHeaderID();

      ColumnData colData = tContext.getColumnData();
      int physicalIndex  = colData.getPhysicalColumnIndex();
      String headers = colData.getHeaderIDs(physicalIndex);
      if (rowID != null)
View Full Code Here

      writer.startElement(XhtmlConstants.TABLE_HEADER_ELEMENT, column);
      cellClass = TableRenderer.getRowHeaderFormatClass();
      if (tContext.isExplicitHeaderIDMode())
      {
        String headerID = column.getClientId(context);
        RowData rowData = tContext.getRowData();
        rowData.setCurrentRowHeaderID(headerID);
        writer.writeAttribute(XhtmlConstants.ID_ATTRIBUTE, headerID, null);
      }
      else
      {
        writer.writeAttribute("scope", "row", null);
View Full Code Here

  public static String getDataStyleClass(TableRenderingContext tContext)
  {
    final String cellClass;
    final ColumnData colData = tContext.getColumnData();
    final RowData rowData = tContext.getRowData();
    int logicalColumn = colData.getLogicalColumnIndex();
    //ystem.out.println("logCol:"+logicalColumn);
    BandingData banding = tContext.getBanding();
    boolean band = banding.getBand(tContext,
                                   rowData.getRangeIndex(),
                                   colData.getPhysicalColumnIndex(),
                                   logicalColumn);

    if (band)
    {
View Full Code Here

    // renders a whole bunch of <TR>...</TR> elements, one for each row in the
    // table, and additional ones for any disclosed-details rows
    //
    // 1. Gather all the data we need to render
    //
    final RowData rowData = tContext.getRowData();
    final UIComponent detail = tContext.getDetail();
    final RenderStage renderStage = tContext.getRenderStage();
    TableUtils.RowLoop loop = new TableUtils.RowLoop() {
      @Override
      protected void processRowImpl(FacesContext fc, CollectionComponent tableBase)
        throws IOException
      {
        ResponseWriter writer = fc.getResponseWriter();
        // compute all the rowSpans for the current row:
        rowData.setCurrentRowSpan(-1);
        //reset
        renderStage.setStage(RenderStage.START_ROW_STAGE);
        renderSingleRow(fc, arc, tContext, (UIComponent) tableBase);
        renderStage.setStage(RenderStage.DATA_STAGE);
        // render each of the individual rows in the rowSpan:
        for (int i = 0, sz = rowData.getCurrentRowSpan();  i < sz;  i++)
        {
          // start the row
          writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
          renderSingleRow(fc, arc, tContext, (UIComponent) tableBase);
          rowData.incCurrentSubRow();
          // end the row
          writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
        }
        // if necessary, render a detail row
        if ((detail != null)&&
View Full Code Here

    UIComponent           component,
    FacesBean             bean
    ) throws IOException
  {
    TreeTableRenderingContext ttrc = (TreeTableRenderingContext) trc;
    final RowData rowData = trc.getRowData();
    boolean isEmptyTable  = rowData.isEmptyTable();

    // render all the table content rows
    if (isEmptyTable)
      _renderEmptyTableRow(context, rc, ttrc);
    else
View Full Code Here

    // renders a whole bunch of <TR>...</TR> elements, one for each row in the
    // table, and additional ones for any disclosed-details rows
    //
    // 1. Gather all the data we need to render
    //
    final RowData rowData = tContext.getRowData();
    final UIComponent detail = tContext.getDetail();
    final RenderStage renderStage = tContext.getRenderStage();
    TableUtils.RowLoop loop = new TableUtils.RowLoop() {
      @Override
      protected void processRowImpl(FacesContext fc, CollectionComponent tableBase)
        throws IOException
      {
        ResponseWriter writer = fc.getResponseWriter();
        // compute all the rowSpans for the current row:
        rowData.setCurrentRowSpan(-1);
        //reset
        renderStage.setStage(RenderStage.START_ROW_STAGE);
        renderSingleRow(fc, rc, tContext, (UIComponent) tableBase);
        renderStage.setStage(RenderStage.DATA_STAGE);
        // render each of the individual rows in the rowSpan:
        for (int i = 0, sz = rowData.getCurrentRowSpan();  i < sz;  i++)
        {
          // start the row
          writer.startElement(XhtmlConstants.TABLE_ROW_ELEMENT, null);
          renderSingleRow(fc, rc, tContext, (UIComponent) tableBase);
          rowData.incCurrentSubRow();
          // end the row
          writer.endElement(XhtmlConstants.TABLE_ROW_ELEMENT);
        }
        // if necessary, render a detail row
        if ((detail != null)&&
View Full Code Here

TOP

Related Classes of org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.table.RowData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.