-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Can someone help me understand the workings of mixed languages (java/groovy) in a page. Specifically, the interpreter is not finding methods...giving an error like:
No signature of method: Script5.doOk() is applicable for argument types: () values: []
Possible solutions: dump(), wait(), run(), run(), any(), wait(long)
Code...
<?page zscriptLanguage="Groovy"?>
<zk>
<zscript language="java">
void doOk() {
Messagebox.show("ENTER key is pressed", "OK", Messagebox.OK, Messagebox.EXCLAMATION);
inp.focus();
}
</zscript>
<zscript language="Groovy">
def doCtrlKey() {
Messagebox.show(event.getKeyCode()+" is pressed", "CtrlKey", Messagebox.OK, Messagebox.EXCLAMATION)
inp.focus()
}
</zscript>
<panel id="panel" title="CMIS Web, ZK"
border="normal" sclass="p-vista">
<toolbar id="tb" sclass="vista" height="20px" align="end">
<toolbarbutton image="/img/volumn.gif"
onClick='alert("Volumn")' />
<toolbarbutton label="12:55 PM"
onClick='alert("time")' />
</toolbar>
<panelchildren>
<hbox>
<tabbox >
<tabs>
<tab label="Tab 1" closable="true"/>
<tab label="Tab 2" closable="true"/>
<tab label="Tab 3" closable="true"/>
<tab label="Tab 4" closable="true"/>
<tab label="Tab 5" closable="true"/>
</tabs>
<tabpanels>
<tabpanel>
<vbox>
<grid fixedLayout="true" width="400px">
<rows>
<row>
Password
<textbox id="inp" onOK="doOk()" onCancel="doCancel()" ctrlKeys="^a^b#f2" onCtrlKey="doCtrlKey()" type="password" value="123456789" width="150px" />
</row>
</rows>
</grid>
</vbox>
</tabpanel>
</tabpanels>
</tabbox>
</hbox>
</panelchildren>
</panel>
<zscript language="java">
{
void doCancel() {
Messagebox.show("ESC key is pressed", "CANCEL", Messagebox.OK, Messagebox.EXCLAMATION);
inp.focus();
}
}
</zscript>
</zk>
Asked: 2010-06-17 13:23:02 +0800
Seen: 279 times
Last updated: Jun 17 '10