Code: Select all
<form action="j_security_check">
<h:outputLabel value="Login Email:"/>
<h:inputText id="j_username" size="28"/> <br/><br/>
<h:outputLabel value="Password:"/>
<h:inputSecret id="j_password" size="28"/> <br/><br/>
<h:commandButton id="login" value="Login"/>
</form>
Now the above will successfully login me into the system. However, I want to use p:commandButton instead of h:commandButton, since the skinning look better. If I change from h:commandButton to p:commandButton, I get this error.
Code: Select all
javax.faces.FacesException: CommandButton : "login" must be inside a form element
p:commandButton requires to have h:form. I feel like this is a bug, since h:commandButton perform perfectly but I got error with p:commandButton.

