2016-07-01 4 views
0

저는 primeface가 매우 새롭습니다. 대화 상자에서 프라임 스 페이스 탭보기를 구현하려고합니다. 그러나 첫 번째 탭만 렌더링하고 다른 탭은 표시하지 않습니다. 요소를 검사 할 때 다른 모든 탭 코드가 있지만 회색으로 표시됩니다.Primefaces 탭 뷰가 대화 상자에 렌더링되지 않습니다.

Index.xhtml

<ui:composition template="/WEB-INF/templates/main.xhtml" 
xmlns="http://www.w3.org/1999/xhtml" 
xmlns:ui="http://java.sun.com/jsf/facelets" 
xmlns:h="http://java.sun.com/jsf/html" 
xmlns:f="http://java.sun.com/jsf/core" 
xmlns:p="http://primefaces.org/ui"> 
<h:form id="addressForm"> 
    <div align="center"> 
      <p:commandButton value="Edit" id="editInfo" onclick="PF('dlg').show();" 
       icon="ui-icon-pencil" /> 
      <p:dialog widgetVar="dlg" width="860" height="540" header="Information" maximizable="true" minimizable="true" showEffect="fade">     
       <ui:include src="editTabView.xhtml"/> 
      </p:dialog> 
    </div> 
</h:form> 
</ui:composition> 

editTabView.xhtml

<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
xmlns:h="http://java.sun.com/jsf/html" 
xmlns:p="http://primefaces.org/ui" 
xmlns:f="http://java.sun.com/jsf/core" 
xmlns:b="http://xmlns.jcp.org/xml/ns/javaee" 
xmlns:ui="http://java.sun.com/jsf/facelets"> 

<p:tabView cache="true" id="tabView" scrollable="true"> 
    <p:tab id="localAddressTab" title="Local Address"> 
     <h:form id="localAddressForm"> 
      <h1>Testing</h1> 
     </h:form> 
    </p:tab> 
    <p:tab id="permAddressTab" title="Permanent Address"> 
     <h:form id="permAddressForm"> 
      <h1>Testing</h1> 
     </h:form> 
    </p:tab> 
    <p:tab id="mailAddressTab" title="Mailing Address"> 
     <h:form id="mailAddressForm"> 
      <h1>Testing</h1> 
     </h:form> 
    </p:tab> 
</p:tabview> 
</ui:composition> 

내가 놓친 게 무엇인지 모르겠습니다. 아무도 나를 도와주세요.

답변

0

아마도 중첩 된 양식이 문제 일 수 있습니다. 양식을 각 <p:tab>으로 삭제하십시오. 모든 데이터는 <h:form id="addressForm">

에 의해 제출됩니다.
관련 문제