-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086234
By: roxcastaneda
The code below works in a .zul file but when i changed it to JSP with the x:
tags, it won't work. Is there a workaround for this?
Thanks,
-rocky
<html xmlns:zk="http://www.zkoss.org/2005/zk"
xmlns:x="http://www.zkoss.org/2005/zul">
<x:window title="listbox demo" border="normal"> <x:listbox width="250px" context="Menu1" id="lb1">
<x:listhead>
<x:listheader label="name" sort="auto"/>
<x:listheader label="gender" sort="auto"/>
</x:listhead>
<x:listitem value="1">
<x:listcell label="Mary"/>
<x:listcell label="FEMALE"/>
</x:listitem>
<x:listitem value="2">
<x:listcell label="John"/>
<x:listcell label="MALE"/>
</x:listitem>
<x:listitem value="3">
<x:listcell label="Jane"/>
<x:listcell label="FEMALE"/>
</x:listitem>
<x:listitem value="4">
<x:listcell label="Henry"/>
<x:listcell label="MALE"/>
</x:listitem>
</x:listbox>
<x:menupopup id="Menu1" >
<x:menuitem label="do1" onClick="do1()"/>
<x:menuitem label="do2" onClick="do2()"/> </x:menupopup>
<zk:zscript>
void do1()
{
// do something on selected item
Messagebox.show(lb1.getSelectedItem().getValue()+"","Msg", Messagebox.OK, Messagebox.QUESTION); } void do2() {
//do something...
}
</zk:zscript>
</x:window>
</html>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086274
By: henrichen
Please be more specific. What do you mean by "it won't work".
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086286
By: roxcastaneda
Sorry I wasn't so clear.
Upon executing the
<x:menuitem label="do1" onClick="do1()"/>
I get an error:
/////////////////////
Failed to process [object Object]
_e has no properties
_pc1
... etc ...
////////////////////
Did i miss any package to import?
Its so strange because this code works fine in a .zul file and without the x:
tags.
TIA,
-rocky
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086314
By: henrichen
It looks like a bug. Please post to bug list along with your testing code.
Thanks.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086340
By: roxcastaneda
Ok thanks, i hope u guys will find a cure for this.
All the best.
-rocky
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4086362
By: roxcastaneda
Is there any other workaround for this in order for me to get the value?
Messagebox.show(lb1.getSelectedItem().getValue(),"Msg", Messagebox.OK, Messagebox.QUESTION);
Any replacement syntax for the above code that might work in JSP?
-rocky
Asked: 2007-01-04 10:30:37 +0800
Seen: 175 times
Last updated: Jan 04 '07