gpt4 book ai didi

jsf - 如何在具有整页布局的 Primefaces 扩展中获得菜单溢出?

转载 作者:行者123 更新时间:2023-12-02 22:38:43 24 4
gpt4 key购买 nike

问题是我的菜单总是在中心 Pane 下方,我不知道如何解决这个问题。我试图更改 css,但是当更改 pe-layout-pane-content 溢出值时,滚动条不再可见,没有它,pe-north 中的 z-index 根本没有帮助。这让我发疯,因为它曾经在使用 p:layout 和 css-changes 时工作。

我有这样的模板:

<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<h:outputStylesheet library="css" name="global.css"/>
<style type="text/css">


.noBorders tr, .noBorders td {
background: none !important;
border: none !important;
}
</style>
</h:head>

<h:body>

<pe:layout fullPage="true" >

<pe:layoutPane position="north" size="50" resizable="false" closable="false" spacing="0" rendered="true" >
<ui:insert name="north">

<ui:include src="/resources/templates/menuBar.xhtml"/>
</ui:insert>
</pe:layoutPane>



<pe:layoutPane position="west" size="215" resizable="true" closable="true" spacing="-3">
<ui:insert name="west">

</ui:insert>
</pe:layoutPane>



<pe:layoutPane position="east" size="200" resizable="true" closable="true" spacing="-4" >
<ui:insert name="east">

<ui:include src="/resources/templates/commonRight.xhtml"/>
</ui:insert>
</pe:layoutPane>




<pe:layoutPane position="center" size="800" resizable="false">
<h2>
<ui:insert name="title">Default Title</ui:insert>
</h2>

<ui:insert name="center">

Center from newTemplate

</ui:insert>
</pe:layoutPane>

<pe:layoutPane position="south" rendered="false" statusbar="false" size="60" resizable="true" closable="true" spacing="0">
<ui:insert name="south">


<ui:include src="/resources/templates/commonFooter.xhtml"/>


</ui:insert>
</pe:layoutPane>

</pe:layout>
</h:body>

然后我的 menuBar.xhtml 是这样的:

<h:head>
<title>menuBar.xhtml</title>



</h:head>
<h:body>
<ui:composition>
<h:form>
<p:menubar rendered="true" style="border: none; z-index: 9998; overflow: visible" >
<p:submenu label="#{bundle.menuBar_partners}" icon="ui-icon-document">
<p:menuitem value="#{bundle.menuBar_partners_info}" url="#"/>
<p:submenu label="cars" icon="ui-icon-contact" >
<p:menuitem value="www.rangerover.com" url="http://www.rangerover.com"/>
<p:menuitem value="www.lada.com" url="www.lada.com"/>
</p:submenu>
</p:submenu>


</p:menubar>


</h:form>
</ui:composition>

</h:body>

如果有人知道如何解决这个问题,我将非常感激。萨米语

最佳答案

当我将此 CSS 与常规 primefaces 布局和 layoutUnit 一起使用时,溢出对我的北菜单工作正常,但当我将相同的 CSS 与 pe 布局和 layoutPane 一起使用时,它就不行了。

.ui-layout-north {
z-index:40 !important;
overflow:visible !important;
}
.ui-layout-north .ui-layout-unit-content {
overflow:visible !important;
}

也许您现在可以切换到 p layout 和 layoutUnit,因为 primefaces 扩展似乎已经打破了 CSS 的溢出。

此外,对于 pe,我在北菜单的右侧有一个愚蠢的滚动条,但对于 p 我没有。

而且,如果 Oleg 给我们一个 CSS 解决方案(如果有的话)并在他的更新修复此问题时通知我们,这可能会很好。

关于jsf - 如何在具有整页布局的 Primefaces 扩展中获得菜单溢出?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11049101/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com