primefaces-dialog funktioniert nicht

Ich versuche zu replizieren, primefaces ajax-dialog-Formular wie im Primefaces showcase

Meine JSF code-snippet ist als unten

<h:body>  

<p:commandButton id="showDialogButton" type="button" value="Show"  
    onclick="PF('dlg').show()" />  

<p:dialog header="Enter FirstName" widgetVar="dlg" appendToBody="true"  
    resizable="false">  
    <h:form id="form">  

        <h:panelGrid columns="2" style="margin-bottom:10px">  
            <h:outputLabel for="firstName" value="firstName:" />  
            <p:inputText id="firstName" value="#{backingBean.firstName}" />  
        </h:panelGrid>  

        <p:commandButton id="submitButton" value="Submit" update=":display"  
            oncomplete="PF('dlg').hide();" />  

    </h:form>  
</p:dialog>  

<p:outputPanel id="display" style="display:block;margin-top:10px;">  
    <h:outputText id="name" value="Hello #{backingBean.firstName}"  
        rendered="#{not empty backingBean.firstName}" />  
</p:outputPanel>  

Meinem managed bean

@ManagedBean  
@ViewScoped  

public class BackingBean implements Serializable{  


    private String firstName;  

    public String getFirstName() {  
        return firstName;  
    }  

    public void setFirstName(String firstName) {  
        this.firstName = firstName;  
    }  


}  

Keinen dialog wird immer angezeigt, bei Klick auf submit-button :(. Ich habe auch appendToBody="true", aber zu keinem Ergebnis.Im ie bekomme ich javascript Fehler "Objekt Erwartet". Bitte helfen Sie mir, dieses Problem zu lösen.

InformationsquelleAutor javawarrior | 2013-09-06
Schreibe einen Kommentar