我想在我的 Xpage 上的一个按钮上使用 dojo 按钮图标。根据网上看到的一个例子,我应该将“dijit.form.Button”添加到Dojo Type,然后添加一个带有我的按钮值的dojo属性“iconClass”;“dijitEditorIcon dijitEditorIconDelete”。
当我在 Chrome/Firefox 中查看调试控制台时,我看到一个错误:
dojo/parser::parse() error Error {} xspClientDojo.js:5
(anonymous function) xspClientDojo.js:5
_450 dojo.js:15
then._45d.then dojo.js:15
$DDLG_ dojo.js:15
$DDUV_ xspClientDojo.js:5
(anonymous function) dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJq_ dojo.js:15
$DDJr_ dojo.js:15
$DDJp_ dojo.js:15
$DDSM_ dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-
1.8.1/dijit/form/Button.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/form/_ButtonMixin.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/form/DropDownButton.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/_HasDropDown.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/form/ComboButton.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/form/ToggleButton.js". dojo.js:15
XHR finished loading: "http://localhost/xsp/.ibmxspres/dojoroot-1.8.1/dijit/form/_ToggleButtonMixin.js".
编辑:XP:按钮
<xp:button id="button1" value="Delete"
dojoType="dijit.form.Button">
<xp:this.dojoAttributes>
<xp:dojoAttribute name="iconClass"
value="dijitEditorIcon dijitEditorIconDelete">
</xp:dojoAttribute>
</xp:this.dojoAttributes>
</xp:button>
我将 djConfig 设置为 parseOnLoad: true。
我已将 Xpage 的属性设置为“Trigger dojo parse on load”。
我还有一个带有 dojo.require("dijit.form.Button"); 的 onClientLoad 事件。
如果可能的话,使用ND9...