primefaces 菜单无法在整页布局中完全显示 [英] primefaces menu cant fully display out in fullpage layout

查看:28
本文介绍了primefaces 菜单无法在整页布局中完全显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几天前我在 primefaces 论坛上问了 1 个问题,但没有人回复我.

few days ago i ask 1 question in primefaces forum but nobody reply me.

我在整页布局(position="west") 中使用时遇到问题,子菜单无法完全显示.可以让它显示与 (position="center") 重叠,因为我不想增加西方布局的宽度?

I facing a problem while using in fullpage layout(position="west"), the submenu can't fully display out. Can make it display overlap to the (position="center") as I don't wish to increase the width of the west layout?

以下链接附有图片作为参考.

below link atatch with a picture as reference.

http://www.imagebucket.net/bucket/is.php?i=10434&img=image.jpg

这是代码的一部分:

<p:layoutUnit position="west" size="200" >  
  <ui:insert name="sideBar">                        
    <h:form>
      <p:menu type="tiered" >  
        <p:submenu label="Sales" >                                      
          <p:menuitem disabled="#{user.customer}" value="Approve" url="/sales/approve.jsf" style="width:50px" />                                                
        </p:submenu> 
        <p:separator />  
        <p:submenu label="Customer">   
          <p:menuitem disabled="#{user.sales}" value="customer" url="/customer/customer.jsf" style="width:50px" />
        </p:submenu>
      </p:menu>
    </h:form>          
  </ui:insert>  
</p:layoutUnit>

我刚把primefaces更新到3.1,发现有1个功能overlayPanel,请问可以用它来解决我的问题吗?

I just update primefaces to 3.1, and found out got 1 feature overlayPanel, may I know whether it can be used to solve my problem?

提前致谢..

[Eclipse Indigo、tomcat 7、Java EE 6、PrimeFaces 3.1、Mojarra 2.0.3]

[Eclipse Indigo, tomcat 7, Java EE 6, PrimeFaces 3.1, Mojarra 2.0.3]

推荐答案

终于有人回复我在 primefaces 论坛上的帖子了.
它解决了我的问题.
这是链接:
http://forum.primefaces.org/viewtopic.php?f=3&t=18033&p=56425#p56425

finally got someone reply my post in the primefaces forum.
It solved my problem.
here is the link:
http://forum.primefaces.org/viewtopic.php?f=3&t=18033&p=56425#p56425

更新:
回答:一些css技巧就可以修复它,只需更改overflow和z-index属性即可.
我附上答案代码如下:

update:
answer: some css tricks will be able to fix it, just change the overflow and z-index property.
I attach the answer code as below:

<h:head>
 <style>
  #leftPanel {z-index:2 !important; }
  #leftPanel div{overflow:visible;}
 </style>
</h:head>

<p:layoutUnit position="west" size="200" id="leftPanel">  
  <ui:insert name="sideBar">                        
    <h:form>
      <p:menu type="tiered" >  
        <p:submenu label="Sales" >                                      
          <p:menuitem disabled="#{user.customer}" value="Approve" url="/sales/approve.jsf" style="width:50px" />                                                
        </p:submenu> 
        <p:separator />  
        <p:submenu label="Customer">   
          <p:menuitem disabled="#{user.sales}" value="customer" url="/customer/customer.jsf" style="width:50px" />
        </p:submenu>
      </p:menu>
    </h:form>          
  </ui:insert>  
</p:layoutUnit>

这篇关于primefaces 菜单无法在整页布局中完全显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆