Plands.com Logo  Business Internet Services 
Main Menu
Home
Planetary CRM
  Benefits
  Features
  Demo
E-Mail Services
  E-mail Hosting
  Newsletters
  Discussion Lists
Web Hosting
Server Co-location
and Administration
Web Applications
Technical Support
Contact Us
DXP Samples
 
DxpHome  ||   Samples  ||   Details  ||   Docs  ||   Trees  ||   xml-xsl  ||   Links
// CellIndex.java

The CellIndex tag is used to print records in separate cells controlled by a LoopSet. In the example below 3 cells will be printed on each row and each cell will contain the data from a single record. The cells will repeat in groups of 3 until all the records are printed.

  
<table cellspacing="2" cellpadding="4" bgcolor="#CCCCFF">
   <dxp:LoopSet recordset="dbSet" cells="3">
      <tr>
         <td width="80">
            <dxp:CellIndex cell="0" index="0"/><br />
            <dxp:CellIndex cell="0" index="1"/><br />
            <dxp:CellIndex cell="0" index="2"/>
         </td>
         <td width="80">
            <dxp:CellIndex cell="1" index="0"/><br />
            <dxp:CellIndex cell="1" index="1"/><br />
            <dxp:CellIndex cell="1" index="2"/>
         </td>
         <td width="80">
            <dxp:CellIndex cell="2" index="0"/><br />
            <dxp:CellIndex cell="2" index="1"/><br />
            <dxp:CellIndex cell="2" index="2"/>
         </td>
      </tr>
   </dxp:LoopSet>
</table>
Note that the LoopSet uses a cells attribute to define the number of cells. The CellIndex tags refer to a specific cell numbered from 0..2 since there are 3 cells. The index attribute specifies the colun index of the record to print in that cell.

The LoopSet hands a row number to each CellIndex tag that corresponds to the beginning row for the current list of cells. The cell number is added as an offset to the starting row number. This picks out the correct record for the cell. Because the cell index is 0 based the maximum cell number should be 1 less than the total number of cells specified in the LoopSet tag. In this example the total number of cells is 3 and the cell indexes run from 0..2.


@author Mark Ashworth
@version 0.1, 2001-07-10

Return to Index

Note: We have tried to test all of the code examples but they may contain errors. Any questions, comments, suggestions, or problems should be sent to info@plands.com.