-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3629909
By: nobody
I'm trying to retreive a cookie and then set a java value from data within the cookie. The only way I know how to access cookies is through javascript.
Is there a way to access a javascript method <h:script type="text/javascript"> function somefunction(){}</h:script> from within a java method inside a <zscript>?
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3630073
By: tomyeh
h:script is a XHTML component, so you you could get its content. Notice that the content is a child of h:script, rather than a property. The child is an instance of com.potix.zhtml.Text.
Cookie is accessible at the server side:
1 EL: ${cookie.name}
2. Java:
Map cookie = Executions.getCurrent().getVariableResolver().resolve("cookie");
Map cookie = comp.getDesktop().getExecution().getVariableResolver().resolve("co
okie");
h:script is a XHTML component, so you you could get its content. Notice that the content is a child of h:script, rather than a property. The child is an instance of com.potix.zhtml.Text.
Asked: 2006-03-14 22:58:02 +0800
Seen: 670 times
Last updated: Jan 11 '22