using dojox grid in xpages

Posted by Tarun on Stack Overflow See other posts from Stack Overflow or by Tarun
Published on 2010-06-15T10:01:46Z Indexed on 2010/06/15 10:12 UTC
Read the original article Hit count: 757

Filed under:

how to use dojox datagrid in xpages? If anyone have code snippet please send it to me at [email protected]
I am trying with the following code but getting nothing at the output:

  <xp:this.resources>
   <xp:dojoModule name="dojox.grid.DataGrid"></xp:dojoModule>
   <xp:dojoModule name="dojox.grid"></xp:dojoModule>
  </xp:this.resources>

  <xp:panel >  
      <xp:scriptBlock id="scriptBlock1">
 <xp:this.value><![CDATA[makeGrid = function(){
 dojo.require("dijit.form.Button");

dojo.require("dojox.grid.DataGrid"); var subrow1 = [{name: "Product Title"}, {name: "Price"}, {name: "Type"}]; var view = {rows: [ subrow1 ]}; var structure = [ view ]; var data = [ ["Baseball gloves", 12.34, "Sports"], ["Tennis ball", 5.99, "Sports"], ["T-shirt", 12.45, "Clothing"], ["Hat", 12.45, "Clothing"] ]; var productModel = new dojox.grid.data.Table(null, data); productModel.render();

};

XSP.addBeforeLoad(makeGrid);]]>

  <div dojoType="dojox.Grid" autoWidth="true" model="productModel"

structure="structure">

  </xp:panel> 

Please help !!

© Stack Overflow or respective owner

Related posts about JavaScript