-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi!
who can tell me how can I popup the login window of spring security with chinese language ? I think this needs to revise the zkspring.jar
This example just overrides the user name & password fields.
Your security context needs:
. . . <http auto-config="true" > . . . <!-- use own login page rather than the default one provided by the SPRING (not ZK) frame work (no .zul or .jsp) --> <form-login login-page="/login.zul"/> </http> . . .
<?taglib uri="/WEB-INF/tld/web/core.dsp.tld" prefix="c"?> <?page id="testZul" title="CUSTOM ZK + SPRING SECURITY LOGIN"?> <window id="loginwin" title="CUSTOM ZK + SPRING SECURITY LOGIN" border="normal" width="500px"> <groupbox> <caption>Valid users</caption> <grid> <columns> <column label="${c:l('app.username')}"/> <column label="${c:l('app.password')}"/> </columns> <rows> <row> rod <label value="koala"/> </row> <row> dianne <label value="emu"/> </row> <row> scott <label value="wombat"/> </row> <row> peter <label value="opal"/> </row> </rows> </grid> </groupbox> <!-- this form-login-page form is also used as the form-error-page to ask for a login again. --> <html style="color:red" if="${not empty param.login_error}"> <![CDATA[ Your login attempt was not successful, try again.<br/><br/> Reason: ${SPRING_SECURITY_LAST_EXCEPTION.message} ]]> </html> <groupbox> <caption>ZUL Login</caption> <h:form id="f" name="f" action="j_spring_security_check" method="POST" xmlns:h="http://www.w3.org/1999/xhtml"> <grid> <rows> <row> <label value="${c:l('app.username')}"/> <textbox id="u" name="j_username"/> </row> <row> <label value="${c:l('app.password')}"/> <textbox id="passwordbox" name="j_password" type="password" constraint="no empty"/> </row> <row><checkbox id="r" name="_spring_security_remember_me"/>Don't ask for my password for two weeks</row> <row spans="2"><hbox> <h:input type="submit" value="Submit Query"/> <h:input type="reset" value="Reset"/> </hbox></row> </rows> </grid> </h:form> </groupbox> </window>
Asked: 2009-06-11 16:08:39 +0800
Seen: 351 times
Last updated: Jun 12 '09