Рекурсивный акроним словосочетания «PHP: Hypertext Preprocessor»
Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 16483 программиста и 1680 роботов. Сейчас ищут 1498 программистов ...
Structures_DataGrid_Renderer_XUL
Вернуться к: Renderer drivers
Structures_DataGrid_Renderer_XUL
Structures_DataGrid_Renderer_XUL – XUL Rendering Driver
This driver supports the following operation modes:
Mode | Supported? |
---|---|
Container Support | no |
Output Buffering | yes |
Direct Rendering | no |
Streaming | no |
Object Preserving | no |
Options
This driver accepts the following options:
Option | Type | Description | Default Value |
---|---|---|---|
buildFooter | bool | Whether to build the footer. | true |
buildHeader | bool | Whether to build the header. | true |
defaultCellValue | string | What value to put by default into empty cells. | null |
defaultColumnValues | array | Per-column default cell value. This is an array of the form: array(fieldName => value, ...). | array() |
encoding | string | The content encoding. If the mbstring extension is present the default value is set from mb_internal_encoding(), otherwise it is ISO-8859-1. | 'ISO-8859-1' |
excludeVars | array | Variables to be removed from the generated HTTP queries. | array() |
extraVars | array | Variables to be added to the generated HTTP queries. | array() |
fillWithEmptyRows | bool | Ensures that all pages have the same number of rows. | false |
hideColumnLinks | array | By default sorting links are enabled on all columns. With this option it is possible to disable sorting links on specific columns. This is an array of the form: array(fieldName, ...). This option only affects drivers that support sorting. | array() |
numberAlign | bool | Whether to right-align numeric values. | true |
onMove | string | Name of a Javascript function to call on onclick/onsubmit events when the user is either paging or sorting the data. This function receives a single object argument of the form: { page: <page>, sort: [{field: <field>, direction: <direction>}, ...], data: <user_data> }. Remark: setting this option doesn't remove the href attribute, you should return false from your handler function to void it (eg: for AJAX, etc..). | null |
onMoveData | string | User data passed in the "data" member of the object argument passed to onMove. No JSON serialization is performed, this is assigned as a raw string to the "data" attribute. It's up to you to add quotes, slashes, etc... | '' |
selfPath | string | The complete path for sorting links | $_SERVER['PHP_SELF'] |
General notes
This renderer class will render a XUL listbox. For additional information on the XUL Listbox, refer to this url: http://www.xulplanet.com/references/elemref/ref_listbox.html
You have to setup your XUL document, just as you would with an HTML document. This driver will only generated the <listbox> element and content.
Examples
Using the XUL renderer
<?php
require_once 'Structures/DataGrid.php';
$datagrid =& new Structures_DataGrid(10);
$options = array('dsn' => 'mysql://username@localhost/mydatabase');
$datagrid->bind("SELECT * FROM mytable", $options);
header('Content-type: application/vnd.mozilla.xul+xml');
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>\n";
echo "<?xml-stylesheet href=\"myStyle.css\" type=\"text/css\"?>\n";
echo "<window title=\"MyDataGrid\"
xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\">\n";
$datagrid->render('XUL');
echo "</window>\n";
?>
Вернуться к: Renderer drivers