cvs: peardoc /en/package/structures/structures-datagrid/structures-datagrid-renderer xul.xml

From: 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 &lt;listbox&gt; element and content. </para> - <para> - Basic example: - <programlisting> -&lt;?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 &quot;&lt;?xml version=\&quot;1.0\&quot; encoding=\&quot;ISO-8859-1\&quot;?&gt;\n&quot;; -echo &quot;&lt;?xml-stylesheet href=\&quot;myStyle.css\&quot; type=\&quot;text/css\&quot;?&gt;\n&quot;; +$datagrid =& new Structures_DataGrid(10); +$options = array('dsn' => 'mysql://username@localhost/mydatabase'); +$datagrid->bind("SELECT * FROM mytable", $options); -echo &quot;&lt;window title=\&quot;MyDataGrid\&quot; - xmlns=\&quot;http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\&quot;&gt;\n&quot;; +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-&gt;setRenderer('XUL'); -$datagrid-&gt;render(); +echo "<window title=\"MyDataGrid\" + xmlns=\"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul\">\n"; + +$datagrid->render('XUL'); -echo &quot;&lt;/window&gt;\n&quot;; -?&gt; +echo "</window>\n"; +?> + +]]> </programlisting> - </para> + </example> </refsect1> </refentry> <!-- Keep this comment at the end of the file

« previous php.pear.doc (#9775) next »