Image not displayed in xe:basicContainerNode from Extension Library in XPages

不羁的心 提交于 2019-12-13 01:18:52

问题


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>

The result looks like this

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?


回答1:


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)

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">

And add a custom css file to your application with the following:

.showIcon .dijitNoIcon{
    display: block;
}


来源:https://stackoverflow.com/questions/21931788/image-not-displayed-in-xebasiccontainernode-from-extension-library-in-xpages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!