Floating toolbar / actionbar / buttonbar in XPages?

感情迁移 提交于 2019-12-11 09:03:59

问题


Does anyone have a floating toolbar for xXages similar to the action bar in Lotus Notes client?

I would like the toolbar to stay at the top of the browser while the browser is scrolled.

The extension pages toolbar looks really nice but first it only does client side code and it does not appear to float.


回答1:


Float is something you can do using CSS and the following:

position: fixed;
top: 0;

For the XPages Extension Library xe:toolbar control you need to use override the following style class in your custom style sheet:

.tundra .dijitToolbar {
  position: fixed;
  top: 0;
}

And then you have a floating toolbar that stays at the top of the window when the user scrolls.

The xe:toolbar does server-side code too since it uses TreeNodes and the onItemClick event where you can add server-side code.




回答2:


Thanks already came up with pretty much the same answer. Here is a CC.

<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

<xp:this.resources>
    <xp:styleSheet href="/PNC001.css"></xp:styleSheet>
</xp:this.resources>
<xp:panel id="toolbar" styleClass="PNCToolBar">

    <xp:callback facetName="ButtonBar" id="callback1"></xp:callback>
</xp:panel>

CSS

.PNCToolBar {
position:fixed;
top:0px;
left:0px;
width:100%;
height:46px;
color:#fff;
background:#F2F2F2;
padding-top:6.0px;
padding-left:15.0px
 }


来源:https://stackoverflow.com/questions/10853111/floating-toolbar-actionbar-buttonbar-in-xpages

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