I'm following the showcase example but it does not work. It was to appear an icon and after I clicked on this icon it opened the Dialog but when I open the page it is already this way:
Thisisthecode:
<body><h:form><h:outputLinkvalue="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>