I know there some posts similar like this one on the page, but none of the posted answers worked for me. I have a login form with jsf and I use ajax to reload a panel depending on the user attributes after login. I have two problems: The first problem is that I can´t make my browser to prompt to save password. I read that if you use ajax for a security reason browsers doesnt store password, is any way to force this? or any workaround? Problem two (I think simpler) I want to execute the button on enter key. This is my form:
<h:form id="formLogin">
<h:panelGroup id="pgLogin" layout="block">
<h:panelGroup id="panel1" rendered="#{empty login.sessionUsuario}" layout="block">
<h:inputText type="text" id="userLogin" value="#{login.usuario}" autocomplete="on">
</h:inputText>
<h:message for="userLogin" class="error"/>
<h:inputSecret type="password" id="passwordLogin" value="#{login.password}" autocomplete="on">
</h:inputSecret>
<f:ajax render="pgLogin loginOK" execute="@form" >
<h:commandLink id="btlogin" action="#{login.iniciarSesion}">
<button type="button" id="logIn">Log In</button>
</h:commandLink>
</f:ajax>
</h:panelGroup>
</h:panelGroup>
</h:form>