Java JSF页面中的Primefaces选项卡菜单

Java JSF页面中的Primefaces选项卡菜单,java,jsf,jsf-2,primefaces,Java,Jsf,Jsf 2,Primefaces,我正在处理使用Primefaces的JSF页面。我设法找到了一个可能的解决办法。这是目前为止的解决方案: 主页: <div id="settingsHashMapz" class="settingsHashMap" style="width:1150px; height:400px; position:absolute; top:20px; left:1px"> <p:tabMenu id="tabs" activeIndex="0" > &

我正在处理使用Primefaces的JSF页面。我设法找到了一个可能的解决办法。这是目前为止的解决方案:

主页:

<div id="settingsHashMapz" class="settingsHashMap" style="width:1150px; height:400px; position:absolute; top:20px; left:1px">

    <p:tabMenu id="tabs" activeIndex="0" >  
        <p:menuitem value="General" url="/DCProfileTabGeneral.jsf" />  
        <p:menuitem value="Zones" url="/DCProfileTabZones.jsf" />  
        <p:menuitem value="UPS" url="/DCProfileTabUPS.jsf" />  

    </p:tabMenu>  

</div>

请你给我一些建议,我怎样才能解决这些问题。

你们有嵌套表单吗?我的意思是,你的标签页包含有
标签,所以请检查你的主页是否也没有
。不,我只有
h:form
在我包含的标签页上。解决方案-我删除了
ui:composition
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"    
      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"
      xmlns:c="http://java.sun.com/jsp/jstl/core">
    <h:head>

    </h:head>
    <h:body>
        <ui:composition>
            <h:panelGroup>
                <h:form id="zones" >
                    <!-- The sortable data table -->
                    .................

                    <!-- The paging buttons -->
                    <h:commandButton styleClass="bimage" value="first" action="#{DCProfileTabZonesController.pageFirst}"
                                     disabled="#{DCProfileTabZonesController.firstRow == 0}" >
                        <f:ajax render="@form" execute="@form"></f:ajax>
                    </h:commandButton>&nbsp;

                    ....................

                    <!-- Set rows per page -->
                    <h:selectOneMenu id="setrows" value="#{DCProfileTabZonesController.rowsPerPage}" converter="javax.faces.Integer" maxlength="2">                                    
                        <f:selectItem itemValue="5" itemLabel="5" />
                        <f:selectItem itemValue="10" itemLabel="10" />
                        <f:selectItem itemValue="20" itemLabel="20" />
                        <f:selectItem itemValue="50" itemLabel="50" />
                        <f:selectItem itemValue="100" itemLabel="100" />     
                        <f:selectItem itemValue="200" itemLabel="200" />
                        <f:ajax render="@form" event="change" execute="@form" listener="#{DCProfileTabZonesController.pageFirst}" />
                    </h:selectOneMenu>&nbsp;

                   ........................
                </h:form>         
            </h:panelGroup>
        </ui:composition>
    </h:body>
</html>
ReferenceError: mojarra is not defined
function onchange(event) {
mojarra.ab(this, event, "valueChange", "@form", "@form");
}