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

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


    TableRenderingContext tContext,
    boolean               isSelect
    ) throws IOException
  {
    ColumnData colData = tContext.getColumnData();
    RowData rowData = tContext.getRowData();
    int row = rowData.getRangeIndex();
    int physicalColumn = colData.getPhysicalColumnIndex();
    int logicalColumn = colData.getLogicalColumnIndex();
   
    BandingData bandingData = tContext.getBanding();
    boolean band = bandingData.getBand(tContext, row,
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

    //
    // 1. Gather all the data we need to render
    //

    final RowData rowData = tContext.getRowData();
    boolean isEmptyTable      = rowData.isEmptyTable();
    final UIComponent detail = tContext.getDetail();

    //
    // 2. Render the top / column header
    //
    _renderTableHeader(context, rc, tContext, component);

    // render the column header
    if (tContext.hasColumnHeaders())
      _renderColumnHeader(context, rc, tContext, component);

    //
    // 3. Render each row
    //

    ColumnData colData = tContext.getColumnData();
    final RenderStage renderStage = tContext.getRenderStage();

    renderStage.setStage(RenderStage.DATA_STAGE);


    // use the special response writer in our data section that
    // defaults data cells with no data to <br>
    //tContext.setDataResponseWriterUsed(true);
    int physicalCol = 0;

    if (isEmptyTable)
    {
      writer.startElement("tr", null);
      if (tContext.hasSelection())
      {
        colData.setColumnIndex(physicalCol++, ColumnData.SPECIAL_COLUMN_INDEX);
        _renderEmptyCell(context, rc, tContext, true, null);
      }

      // render detail control (hide/show for the row)
      if (detail != null)
      {
        colData.setColumnIndex(physicalCol++, ColumnData.SPECIAL_COLUMN_INDEX);
        _renderEmptyCell(context, rc, tContext, true, null);
      }

      int objectNameColumnIndex = colData.getObjectNameColumnIndex();
      if (objectNameColumnIndex < physicalCol)
        objectNameColumnIndex = physicalCol;
      for (int columns = colData.getColumnCount(); physicalCol < columns;)
      {
        colData.setColumnIndex(physicalCol, ColumnData.SPECIAL_COLUMN_INDEX);

        final Object emptyText;
        if (objectNameColumnIndex == physicalCol)
        {
          emptyText = getEmptyText(component, bean);
        }
        else
        {
          emptyText =  null;
        }

        _renderEmptyCell(context, rc, tContext, false, //isSelect
                         emptyText);
        physicalCol++;
      }
      writer.endElement("tr");
    }
    else //not an empty table
    {
      TableUtils.RowLoop loop = new TableUtils.RowLoop()
        {
          @Override
          protected void processRowImpl(FacesContext fc, CollectionComponent tableBase)
            throws IOException
          {
            ResponseWriter rw = fc.getResponseWriter();
            // compute all the rowSpans for the current row:
            rowData.setCurrentRowSpan(-1); //reset
            renderStage.setStage(RenderStage.START_ROW_STAGE);
            renderSingleRow(fc, rc, tContext, component);
            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
              rw.startElement("tr", null);
              renderSingleRow(fc, rc, tContext, component);
              rowData.incCurrentSubRow();
              // end the row
              rw.endElement("tr");
            }

            // if necessary, render a detail row
View Full Code Here

    TableRenderingContext tContext,
    boolean               isSelect
    ) throws IOException
  {
    ColumnData colData = tContext.getColumnData();
    RowData rowData = tContext.getRowData();
    int row = rowData.getRangeIndex();
    int physicalColumn = colData.getPhysicalColumnIndex();
    int logicalColumn = colData.getLogicalColumnIndex();

    BandingData bandingData = tContext.getBanding();
    boolean band = bandingData.getBand(tContext, row,
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

    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

    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

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.