-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Greetings to everyone on the zk forum
We have a large enterprise site allready made using spring mvc and spring security, we have some jsp pages that are using the submit form, with the action pointed to the j_securty_check, We would like to use zk jsp tags, but we haven't yet accomplish that. For example
<form method="post" action="./j_spring_security_check" name="loginForm" id="loginForm">
....
...
<input name="enter" type="submit" id="entrar" value="<fmt:message key="BUTTON.ENTER"/>" />
We now that ZK is based on events, but how we can just use the zk jsp tags to submit form? is that valid on zk jsp tags idea? We have allready create the validations for all the forms, and the permisology too, Do we have to recreate all the jsp pages into a zul pages? We have been investigating on the forums, but we didn't find a solution for zk jsp, the major info is using a zul pages, but we are trying to avoid that, since we have all developed with spring mvc, and It will represent an extra effort. We were also thinking on create a z:button that calls a javascript function that will call the document.action = j_security_check and the document.submit();
<z:button label="ENTRAR">
<z:attribute name="onClick">
js that calls the javascript method for the submit
</z:attribute>
</z:button>
Is this js script able to call a html object, like said, the loginForm?
Thanks
yes, in ZK,
you can call anything on the html page.
Hi,
>> Is this js script able to call a html object, like said, the loginForm?
No, all the zk code is executed on the server side.
You can use the action property of the zk components, for example
<button action='onclick:subitFormJavascriptFunction()' />
Now, if you are on the server side take a look at the org.zkoss.zk.ui.util.Clients class.
Regards,
edgar
Hi Edgar
Thanks for your reply, I got this solution using Clients class
<z:button id="boton" label="ENTRAR">
<z:attribute name="onClick">
Clients.submitForm("loginForm");
</z:attribute>
</z:button>
Now I can submit a form.
Hi jtopin, thanks for your reply either, I will take a look of ZK's html. I will post a comment as soon as I read more about it.
Asked: 2009-04-23 22:59:44 +0800
Seen: 546 times
Last updated: Apr 26 '09