cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-renderer xul.xml
| From: | Olivier Guilyardi | Date: | Fri, 15 Jun 2007 19:40:02 +0000 |
| Subject: | cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-renderer xul.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-9775@lists.php.net to get a copy of this message | ||
olivierg Fri Jun 15 19:40:02 2007 UTC
Modified files:
/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer
xul.xml
Log:
update xul example
http://cvs.php.net/viewvc.cgi/peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml?r1=1.8&r2=1.9&diff_format=u
Index: peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml
diff -u peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.8
peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.9
--- peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml:1.8 Sat
Dec 9 17:46:32 2006
+++ peardoc/en/package/structures/structures-datagrid/structures-datagrid-renderer/xul.xml Fri Jun
15 19:40:02 2007
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1" ?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<refentry
id="package.structures.structures-datagrid.structures-datagrid-renderer.xul">
<refnamediv>
<refname>Structures_DataGrid_Renderer_XUL</refname>
@@ -145,26 +145,36 @@
document. This driver will only generated the <listbox> element and
content.
</para>
- <para>
- Basic example:
- <programlisting>
-<?php
-header('Content-type: application/vnd.mozilla.xul+xml');
+ </refsect1>
+ <refsect1
id="package.structures.structures-datagrid.structures-datagrid-renderer.xul.examples">
+ <title>Examples</title>
+ <example>
+ <title>Using the XUL renderer</title>
+ <programlisting role="php">
+<![CDATA[
+<?php
+require_once 'Structures/DataGrid.php';
-echo "<?xml version=\"1.0\"
encoding=\"ISO-8859-1\"?>\n";
-echo "<?xml-stylesheet href=\"myStyle.css\"
type=\"text/css\"?>\n";
+$datagrid =& new Structures_DataGrid(10);
+$options = array('dsn' => 'mysql://username@localhost/mydatabase');
+$datagrid->bind("SELECT * FROM mytable", $options);
-echo "<window title=\"MyDataGrid\"
- xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\">\n";
+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";
-// Instantiate your datagrid and setup its datasource, then call:
-$datagrid->setRenderer('XUL');
-$datagrid->render();
+echo "<window title=\"MyDataGrid\"
+ xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\">\n";
+
+$datagrid->render('XUL');
-echo "</window>\n";
-?>
+echo "</window>\n";
+?>
+
+]]>
</programlisting>
- </para>
+ </example>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file