本文介绍了图像未显示在XPe中的扩展库中的xe:basicContainerNode中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我有一个来自扩展程序库的弹出菜单的代码如下: I have the following code for a popupmenu from Extension library <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><xp:link escape="true" text="Open popup" id="link1"> <xp:eventHandler event="onclick" submit="false"> <xp:this.script><![CDATA[XSP.openMenu(thisEvent,#{javascript:getComponent('pop').getMenuCtor()})]]></xp:this.script> </xp:eventHandler></xp:link>结果如下 正如你可以看到图像对于基本的containerNode不显示,但是显示basicLeafNode的图像。As you can see the image for the basic containerNode is not displayed but the image for the basicLeafNode is displayed.我想向容器节点添加一个箭头,以便用户知道它有子项,我可以这样做吗?I want to add an arrow to the container node so that users know it has sub items, how can I do that?推荐答案使用firebug我可以看到basicContainerNode的图像图标已经添加了类dijitNoIcon对它,它为图标图像设置显示:无。而叶节点没有添加dijiNoIcon类。 (我可能需要进一步研究这个可能的缺陷)Using firebug I can see that the image icon for the basicContainerNode has the class "dijitNoIcon" added to it, which sets "display:none" for the icon image. Whereas the leaf node does not have that dijiNoIcon class added. (I might need to look into that further as a possible defect)但是,作为一种解决方法,您可以使用一些自定义CSS来覆盖dijitNoIcon正在执行的操作。 > But, as a workaround you could use some custom CSS to override what dijitNoIcon is doing.<xe:basicContainerNode image="/vwicn148.gif" label="Container" styleClass="showIcon">然后添加一个自定义css文件到您的应用程序与以下:And add a custom css file to your application with the following:.showIcon .dijitNoIcon{ display: block;} 这篇关于图像未显示在XPe中的扩展库中的xe:basicContainerNode中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 00:59