5

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

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

this is part of the code:

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

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?

thanks in advance..

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

heng heng
  • 693
  • 3
  • 13
  • 25
  • This is not an answer but just some information. By default the submenu DOM element has an inline style set for a `z-index: 1001` when it is `display: none`, however when it is set to `display: block` from a Javascript hover event, that same event is also increasing the `z-index: 1018`. The problem with this is that even if you set an inline style, it will likely be overridden by the Primefaces javascripts. But even then I don't think z-index is the cause as the z-index for the center panel is usually set to 1 by default. This certainly doesn't see like an easy problem. – maple_shaft Feb 06 '12 at 12:29

1 Answers1

9

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

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>
heng heng
  • 693
  • 3
  • 13
  • 25