Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/jsf/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jsf-2/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Jsf Primefaces<;p:选择一个功能表>;显示问题_Jsf_Jsf 2_Primefaces - Fatal编程技术网

Jsf Primefaces<;p:选择一个功能表>;显示问题

Jsf Primefaces<;p:选择一个功能表>;显示问题,jsf,jsf-2,primefaces,Jsf,Jsf 2,Primefaces,我有一个完整的页面布局。顶部布局单元有一个菜单,选择一个菜单。菜单项显示不正确。菜单项与SelectOne菜单重叠 这是我的xhtml代码和使用的样式 <?xml version='1.0' encoding='UTF-8' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

我有一个完整的页面布局。顶部布局单元有一个菜单,选择一个菜单。菜单项显示不正确。菜单项与SelectOne菜单重叠

这是我的xhtml代码和使用的样式

<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:p="http://primefaces.org/ui">

<h:head>

    <style type="text/css">
.ui-widget {
    font-size: 12px !important;
}

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

</style>

</h:head>

<h:body>

    <p:layout fullPage="true" id="layout1">

        <p:layoutUnit id="top" position="north" size="104">
            <h:form>
<p:menubar autoSubmenuDisplay="true" id="menubar1">
</p:menubar>
<h:panelGroup id="t1">
                    <p:toolbar rendered="#{menuBean.renderP1}" id="toolbar1">
                        <p:toolbarGroup align="left">
<p:selectOneMenu id="prod" value="#{menuBean.product}"
                                style="width:155px;" required="true"
                                requiredMessage="Select a product">
                                <f:selectItem itemLabel="Select product" itemValue="" />
                                <f:selectItems value="#{menuBean.products}" />
                                <!-- Product changed -->
                                <p:ajax event="change" update="prodVar,brkType,brkRevision"
                                    listener="#{menuBean.productChanged}" />

                            </p:selectOneMenu>

                            <p:spacer width="50" height="10" />

                            <p:selectOneMenu id="prodVar" value="#{menuBean.productVariant}"
                                style="width:165px;" required="true"
                                requiredMessage="Select product variant">
                                <f:selectItem itemLabel="Select Variant" itemValue="" />
                                <f:selectItems value="#{menuBean.productVariants}" />
                                <!-- productVariant changed -->
                                <p:ajax event="change" update="brkType,brkRevision"
                                    listener="#{menuBean.productVariantChanged}" />
                            </p:selectOneMenu>
</p:toolbarGroup>
                    </p:toolbar>
                </h:panelGroup>
            </h:form>
        </p:layoutUnit>
<p:layoutUnit id="center" position="center">
            <h:form id="form2">
                <h:panelGroup id="t2">
                    <p:tabView id="tabView" rendered="#{menuBean.renderP2}">

                            </h:panelGrid>
                        </p:tab>

                    </p:tabView>
                </h:panelGroup>
            </h:form>
        </p:layoutUnit>

    </p:layout>

</h:body>

</html>

.ui小部件{
字体大小:12px!重要;
}
**.ui布局北{
z指数:20!重要;
溢出:可见!重要;
}
.ui布局北.ui布局单元内容{
溢出:可见!重要;
}**

我记得某个时候向Cagatay报告过,这是primefaces 3.0RC1版本的最新版本。此外,您可以尝试添加到css文件中,以使布局可见

.ui-layout-north {
    overflow:visible !important;
}

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

我找不到任何解决方案来修复此显示问题。为了解决这个问题,我把所有的选择菜单从北移到了中央布局。它暂时解决了这个问题。

您的primefaces版本是什么?