-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all,
Referent ZK Demo effect login .
<zscript><![CDATA[ void loginCheck () { if ((name.getValue().equals("zk") && pwd.getValue().equals("zk"))) { mesg.setValue("OK"); Clients.evalJavaScript("zk.Widget.$('$loginWin').setMinimized(true)"); initBtn.getParent().appendChild(new Label("Login Success !! Welcome to ZK Demo!")); } else { mesg.setValue("User Name or Password Invalid!"); Clients.evalJavaScript("loginFaild()"); }; } ]]></zscript>
you could add a div displayed only when a variable is bind to. For example on viewmodel you could have an Integer that is 0 for no action, 1 for login ok and 2 for login error. Then you could bind it to a div on zul side and then change it in your loginCheck() when it is called
Asked: 2012-12-18 08:08:05 +0800
Seen: 62 times
Last updated: Dec 18 '12