2017-05-12 14 views
-1

PrimeFacesはレンダリングされません。私はすべてを正しく構成しました(そう願っています)。PrimeFacesでコンポーネントが完全にレンダリングされない

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<ui:composition xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:p="http://primefaces.org/ui" 
    xmlns:mp="http://primefaces.org/ui/material"> 
    <head> 
<title>Welcome Page</title> 
    </head> 
    <body> 
     <h:head> 
      <h:form> 
       <h:panelGrid columns="4" cellpadding="5"> 
        <h:outputLabel for="name" value="Name:" style="font-weight:bold" /> 
        <p:inputText id="name" value="#{basicView.text}" /> 
        <p:commandButton value="Submit" update="display" 
         icon="ui-icon-check" /> 
        <h:outputText id="display" value="#{basicView.text}" /> 
       </h:panelGrid> 
      </h:form> 
     </h:head> 
    </body> 
</ui:composition> 
public class BasicView { 

    private String text; 

    public String getText() { 
     return text; 
    } 

    public void setText(String text) { 
     this.text = text; 
    } 
} 

私はすべての注釈とlibが含まれています。

Here is the Index.xhtml output

答えて

2

あなたは頭と体のタグを台無しに。また、体にあなたのフォームを置く必要があります。

<!DOCTYPE html> 
<h:html xmlns="http://www.w3.org/1999/xhtml" 
    xmlns:ui="http://java.sun.com/jsf/facelets" 
    xmlns:f="http://java.sun.com/jsf/core" 
    xmlns:h="http://java.sun.com/jsf/html" 
    xmlns:p="http://primefaces.org/ui" 
    xmlns:mp="http://primefaces.org/ui/material"> 
    <h:head> 
     <title>Welcome Page</title> 
    </h:head> 
    <h:body> 
     <h:form> 
      <h:panelGrid columns="4" cellpadding="5"> 
       <h:outputLabel for="name" value="Name:" style="font-weight:bold" /> 
       <p:inputText id="name" value="#{basicView.text}" /> 
       <p:commandButton value="Submit" update="display" 
        icon="ui-icon-check" /> 
       <h:outputText id="display" value="#{basicView.text}" /> 
      </h:panelGrid> 
     </h:form> 
    </h:body> 
</h:html> 
+1

この種のxhtmlが作成されたとき、私はいつもチュートリアルが使用されているのだろうか。私たちはGoogleで「除去」する必要がありますので、誰もこのアス – Kukeltje

関連する問題