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]
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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With