Page Blocks

Hosting sponsored by:

Point In Space

GUI Demonstrations

Records Lists

The records list custom type performs a database search and draws the records according to a config file definition. The Reference section of this site uses this, as does the Code and Article lists of www.ldml.org.

The reference list record set is created like this:

var:'refcList'= (fwp_listRcrds:
    -inputs	= 'm_rfcAPI, m_rfcType, m_rfcRnm, m_rfcRel',
    -name	= 'refcList',
    -config	= 'pbrefc',
    -table	= $fw_gTables->find:'pbrefc',
    -select = 'rcrdNo, refcName, refcAPI, refcType, refcVersion, refcVersionDate, refcRelease, refcStatus',
    -sort	= 'refcName```asc```by name',
    -keyfld	= 'rcrdNo',
    -where	= 'form');

The query is handed off to the database API with a reference to the results being embedded in the list object. Work is in progress to have the list object accept a reference to an existing named inline, an array of arrays, or an array of maps.

The list is then drawn with a simple command like this:

$refcList->draw;

This is the configuration menu used for the /refc/ list

[output_none] # # version: 5.0 # released: 2006-01-16 # # do not use literal { or } characters except for config file parsing # use entities to display them as data if needed #------------------------------------------------------------------------------ # general table config # {tableConfig: # table tag listCellSpacePx===1 #listCellPadPx===0 #listTableBorderPx===0 #listTableWidth=== # css style selectors to use listDivClass===stdlist listHdrClass===hdr listAltRowAClass===altrowA listAltRowBClass===altrowB listHdrSortClass===sorted listDataSortClass===sorted # location and size of asc|desc buttons listSortAscBtn===[$fw_sPath->'controls']ibtn_sortAsc.gif listSortDescBtn===[$fw_sPath->'controls']ibtn_sortDesc.gif # location of list navigation panel listTopNavPanel===[$fw_mPath->'panels']listNavPanel.dsp #listBtmNavPanel===[$fw_sPath->'panels']listNavPanel.dsp } #-------------------------------------------------------- # data columns config # {column: lblName===View lblStyle===cntr cellType===form cellWidth===32 cellSortDefault=== cellContent=== cellStyle===cntr formAction===[var:'m_rfcRnm'] formHidden=== formButton===[$fw_sPath->'controls']ibtn_view_grn.gif formBtnName===listBtnView formPrvlg=== } {column: lblName===Name lblStyle===cntr cellType===field cellWidth===244 cellSortDefault===refcName```asc```alphabetically by name cellContent===[$m_rfcRnm] cellStyle===left } {column: lblName===API lblStyle===cntr cellType===field cellWidth===52 cellSortDefault===refcAPI```asc```alphabetically by API cellContent===[$m_rfcApi] cellStyle===cntr } {column: lblName===Type lblStyle===cntr cellType===field cellWidth===82 cellSortDefault===refcType```asc```alphabetically by Type cellContent===[$m_rfcType] cellStyle===cntr } {column: lblName===Version lblStyle===cntr cellType===field cellWidth===92 cellSortDefault=== cellContent===[$m_rfcVrsn]<br /><span class="dim">[$m_rfcVdat]</span> cellStyle===cntr } {column: lblName===Release lblStyle===cntr cellType===field cellWidth===72 cellSortDefault===refcRelease```asc```by Release cellContent===[$m_rfcRel] cellStyle===cntr } {column: lblName===Status lblStyle===cntr cellType===field cellWidth===62 cellSortDefault=== cellContent===[$m_rfcStat] cellStyle===cntr } [/output_none]

© 2002-2012, pageblocks.org