-
FEATURED COMPONENTS
First time here? Check out the FAQ!
test.zul
<window apply="com.TestController">
<script type="text/javascript" defer="false">
<![CDATA[
var comm = {
test:function(id)
{
//alert(host.info);
var msgWidget = zk.Widget.$(id);
msgWidget.setValue("123");
}
};
<textbox id="test"/>
<button label="click" onClick="alert(test.value)"/>
</window>
TestController.java
public class TestController extends GenericForwardComposer
{
private Textbox test;
public void doAfterCompose(Component comp) throws Exception
{
super.doAfterCompose(comp);
Clients.evalJavaScript("comm.test(\"" + test.getUuid() + "\");");
}
}
the js is set textbox value but when i click the button alert msg is ""
how i to get the textbox value
Asked: 2011-02-23 01:56:58 +0800
Seen: 168 times
Last updated: Feb 23 '11