-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have the following login form:
<?page title="Translator"?> <?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?> <?link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico"?> <window title="${c:l('login.login')}" border="normal" width="500px" position="center" mode="overlapped"> <h:form id="f" name="f" action="../j_spring_security_check" method="POST" xmlns:h="native"> <grid> <rows> <row if="${not empty SPRING_SECURITY_LAST_EXCEPTION.message}"> <label value="${c:l('login.failed')}:" /> ${SPRING_SECURITY_LAST_EXCEPTION.message} </row> <row> ${c:l('login.user')}: <textbox id="u" name="j_username" /> </row> <row> ${c:l('login.password')}: <textbox id="p" type="password" name="j_password" /> </row> <row> ${c:l('login.remember')}: <checkbox id="r" name="_spring_security_remember_me" /> </row> <row spans="2"> <hbox pack="end" width="100%"> <h:input type="reset" value="${c:l('button.reset')}" /> <h:input type="submit" value="${c:l('login.login')}" /> </hbox> </row> </rows> </grid> </h:form> </window>
I have the same problem.
Any solution to this?
I've tried different solutions in the past, but nothing worked, so I think that it's not possible to bring a browser to save login credentials for an Ajax-form. The browser doesn't recognize it properly. I would recommend to use a traditional HTML/JSP-based form and submit the values to your ZK-application which resolves the login.
Cheers, Maik
Damn,
thanks for your reply though Maik.
I guess it's time for some refactoring >:(
Hmmmmm, only an idea.
You can underlay a zk controller. In the onCreateLoginWindow() you can pre-define the user/pwd textboxes from readout a cookie ?
best
Stephan
Hm, no bad idea.
If I understood you correctly, that would bypass the browser's password manager and instead set username and password and manually if a cookie exists.
yes, it's pre-defined values for the textboxes from a cookie.
See the ZkLoginDialog.java and the zkloginDialog.zul in Zksample2. Delete not used stuff and add the cookie stuff in there.
Worked very nicely :-D
Thanks for the tip!
Asked: 2011-02-08 08:06:05 +0800
Seen: 1,141 times
Last updated: Sep 14 '11