<p:dialog> does not work

Asked

Viewed 69 times

2

I’m following the example of the showcase but it doesn’t work. An icon was supposed to appear and after I clicked on this icon it opened the Dialog but when I open the page is already like this:

inserir a descrição da imagem aqui

That is the code:

<body>
    <h:form>            
    <h:outputLink value="javascript:void(0)" onclick="PF('dlg').show();" title="login">
        <p:graphicImage name="/demo/images/login.png" />
    </h:outputLink>

    <p:growl id="growl" sticky="true" showDetail="true" life="3000" />

    <p:dialog header="Login" widgetVar="dlg" resizable="false" >
        <h:panelGrid columns="2" cellpadding="5">
            <h:outputLabel for="username" value="Username:" />
            <p:inputText id="username" value="#{userLoginView.username}" required="true" label="username" />

            <h:outputLabel for="password" value="Password:" />
            <p:password id="password" value="#{userLoginView.password}" required="true" label="password" />

            <f:facet name="footer">
                <p:commandButton value="Login" update="growl" actionListener="#{userLoginView.login}"
                                 oncomplete="handleLoginRequest(xhr, status, args)" />
            </f:facet>  
        </h:panelGrid>
    </p:dialog>
</h:form>
</body>
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.