2016-05-02 3 views
0

".xhtml"を他に含めようとしています。そしてそれはで "Internet Explorerの" で完璧に動作しなく "クローム"<p:panel>のアップデートはIEでは有効ですが、クロムでは機能しません

マイprincipaleビューその一つがmenu.xhtmlある2つのビューが含まれ

<ui:define name="content"> 
    <div class="ui-grid ui-grid-responsive"> 
     <div class="ui-grid-row"> 

      <div class="ui-grid-col-1" id="menuLeft"> 
       <ui:include src="menu.xhtml" /> 

      </div> 

      <div class="ui-grid-col-1" id="ber"> 
       <p:panel id="principalePanel" > 
        <ui:include src="#{navigationBean.page}" /> 
       </p:panel> 
      </div> 

     </div> 
    </div> 

</ui:define> 

menu.xhtml:;私は実際には、一例はクロムで、少なくともOSX上で動作しない<b:navLink>

<b:panel id="basic" title="Modules" collapsible="false" look="primary"> 
     <h:form id="formMenuLeft"> 

      <p:accordionPanel id="panelMenuLeft"> 

       <p:tab title="R H" id="tabMenuLeft"> 

        <b:flyOutMenu id="ferd"> 

         <b:navLink value="New Compte" id="navcreat" 
         update="@([id$=principalePanel])" onclick="ajax:navigationBean.setPage('viewcreat.xhtml')"/> 

         <b:navLink value="search" id="fedrt" update=":#{p:component('principalePanel')}"onclick="ajax:navigationBean.setPage('viewSearch.xhtml')"/> 

        </b:flyOutMenu> 

       </p:tab> 

      </p:accordionPanel> 

      </h:form> 
      </b:panel> 
+0

は、あなたが任意のネストされたフォームはあなたのページにあります確認することができますフォームは許可されません。 – techipank

+0

'p:panel'ではなく' h:panelGroup'を使って動作しますか? 'b:*'コードを 'p:accordionPanel'の外側に置くとうまくいきますか?インクルードを使用せずにコードを直接ページに置くと動作しますか?[mcve] – Kukeltje

+0

Kukeltje; 'p:panel'の代わりに 'h:panelGroup'を使用しても、同じ問題がまだ存在し、ビューに他のものを含めることはできません。 – user3693890

答えて

0

を使用して、私のマイprincipaleビューで他のビューを含めることになっています。私は私のバージョンを投稿します - 多分暗闇に潜む微妙な違いがあります:

いるindex.xhtml:

<?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html> 
    <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:b="http://bootsfaces.net/ui" 
      xmlns:p="http://primefaces.org/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
     <h:head> 
      <title>BootsFaces: next-gen JSF Framework</title> 
      <meta name="author" content="Riccardo Massera"></meta> 
     </h:head> 
     <h:body style="padding-top: 60px"> 
      <div class="ui-grid ui-grid-responsive"> 
       <div class="ui-grid-row"> 
        <div class="ui-grid-col-5" id="menuLeft"> 
         <ui:include src="menu.xhtml" /> 
        </div> 
        <div class="ui-grid-col-5" id="ber"> 
         <p:panel id="principalePanel" title="principale" > 
         <ui:include src="#{navigationBean.page}" /> 
         </p:panel> 
        </div> 
       </div> 
      </div> 
     </h:body> 
    </html> 

menu.xhtml

<?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html> 
    <ui:fragment 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://bootsfaces.net/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
     <b:panel id="basic" title="Modules" collapsible="false" look="primary"> 
     <h:form id="formMenuLeft"> 

      <p:accordionPanel id="panelMenuLeft"> 
      <p:tab title="R H" id="tabMenuLeft"> 
       <b:flyOutMenu id="ferd"> 
       <b:navLink value="New Compte" id="navcreat" update="@([id=principalePanel])" 
        onclick="ajax:navigationBean.setPage('start.xhtml')" /> 
       <b:navLink value="search" id="fedrt" update=":#{p:component('principalePanel')}" 
        onclick="ajax:navigationBean.setPage('search.xhtml')" /> 
       </b:flyOutMenu> 
      </p:tab> 
      </p:accordionPanel> 
     </h:form> 
     </b:panel> 
    </ui:fragment> 

検索。 xhtml

<?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html> 
    <ui:fragment 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://bootsfaces.net/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
    <b:panel title="Search" look="success"> 
    </b:panel> 
    </ui:fragment> 

start.xhtml:

<?xml version='1.0' encoding='UTF-8' ?> 
    <!DOCTYPE html> 
    <ui:fragment 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://bootsfaces.net/ui" 
      xmlns:ui="http://java.sun.com/jsf/facelets"> 
     <b:panel title="Create" look="primary"> 
     </b:panel> 
    </ui:fragment> 

NavigationBean.java:あなたが動的にここにネストされた手段は、内部に形成ページを含めた一方で

package net.bootsfaces.demo.ajax; 

    import java.io.IOException; 
    import java.io.Serializable; 

    import javax.faces.bean.ManagedBean; 
    import javax.faces.bean.SessionScoped; 
    import javax.faces.context.FacesContext; 

    @ManagedBean 
    @SessionScoped 
    public class NavigationBean implements Serializable { 
     private static final long serialVersionUID = 1L; 

     private String page="start.xhtml"; 

     public String getPage() { 
      return page; 
     } 

     public void setPage(String currentPage) { 
      this.page=currentPage; 
     } 
    }   
+0

ステファンありがとうございます。バージョン – user3693890

+0

をお試しください。ようこそ!それが動作する場合は、再度報告してください。 –

関連する問題