在 xpages 中使用 dojox 网格
如何在xpages中使用dojox数据网格?如果有人有代码片段,请将其发送给我 [电子邮件受保护]< br> 我正在尝试使用以下代码,但在输出中没有得到任何结果:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoTheme="true"
dojoParseOnLoad="true" >
<link rel="stylesheet" type="text/css"
href="../dijit/themes/tundra/tundra.css" />
<link rel="stylesheet" type="text/css"
href="../dojox/grid/_grid/tundraGrid.css" />
<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);]]>
</xp:this.value>
</xp:scriptBlock>
<div dojoType="dojox.Grid" autoWidth="true" model="productModel"
structure="structure"></div>
</xp:panel>
</xp:view>
请帮助!
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:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core" dojoTheme="true"
dojoParseOnLoad="true" >
<link rel="stylesheet" type="text/css"
href="../dijit/themes/tundra/tundra.css" />
<link rel="stylesheet" type="text/css"
href="../dojox/grid/_grid/tundraGrid.css" />
<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);]]>
</xp:this.value>
</xp:scriptBlock>
<div dojoType="dojox.Grid" autoWidth="true" model="productModel"
structure="structure"></div>
</xp:panel>
</xp:view>
Please help !!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您运行的是 Domino 8.5.2,那么您可以从 OpenNTF 下载 Xpages 扩展库,其中包含使用内置 dojox 网格的示例,无需编码:-): http://extlib.openntf.org/
If you're running Domino 8.5.2 then you can download the Xpages Extension library from OpenNTF, this has examples of using the dojox grid built in, no coding required :-): http://extlib.openntf.org/