Dojo 我如何添加“FontAwesome”;字体图像“;在XPages的扩展库中弹出菜单
我正在使用扩展库中的弹出菜单,如下所示Dojo 我如何添加“FontAwesome”;字体图像“;在XPages的扩展库中弹出菜单,dojo,xpages,font-awesome,xpages-extlib,Dojo,Xpages,Font Awesome,Xpages Extlib,我正在使用扩展库中的弹出菜单,如下所示 <xe:popupMenu id="pop"> <xe:this.treeNodes> <xe:basicContainerNode image="/vwicn148.gif" label="Container"> <xe:this.children> <xe:basicLeafNode label="Child" ima
<xe:popupMenu id="pop">
<xe:this.treeNodes>
<xe:basicContainerNode image="/vwicn148.gif" label="Container">
<xe:this.children>
<xe:basicLeafNode label="Child" image="/vwicn148.gif"></xe:basicLeafNode>
</xe:this.children>
</xe:basicContainerNode>
</xe:this.treeNodes></xe:popupMenu>
它看起来像这样,在标签前添加了一个图像
因为我的网站只使用FontAwesome的“字体图标”,所以我想显示这些图标,而不是普通的图像。我该怎么做呢?您有4个选项(它们并不漂亮):
- 使用Tim建议的自定义渲染器
- 子类化控件,以便通过passthrou呈现标签
- 游说ExtLib团队添加新属性
- 使用XSP.OnLoad脚本添加字体awesom标记
popupMenu
组件的默认呈现器类,覆盖您希望以不同方式处理的特定方法,注册新的呈现器,并将组件实例的rendertype
属性设置为自定义备选方案的ID,可以直接在组件实例上,也可以通过主题全局执行。在运行时,将发送自定义HTML而不是默认HTML。