0

JSP and ZUL Events not Working

asked 2006-10-31 19:10:16 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3990220

By: nobody

Hi all,
I have configured to use ZUL in a legacy struts web application as in the small talks. Thanks!! great stuff. However, for some reason events are not working..
Components are rendered but events do not fire (forEach doesn't seem to work either). Any ideas hints, on where to look at?

<?xml-stylesheet href="/css/zul.css" type="text/css"?> <window xmlns:zul="http://www.zkoss.org/2005/zul"
xmlns:zk="http://www.zkoss.org/2005/zk"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul
http://www.zkoss.org/2005/zul/zul.xsd"
border="normal" >
<zk:zscript>
java.util.List hijos=null;
edu.company.model.UserSession ando =
edu.company.controller.EcadSession.getLogger(Executions.getCurrent());
edu.company.logic.IActorManager am = new edu.company.logic.ActorManagerFactory().getActorManager();
hijos = am.getChilds(ando.getCode());
</zk:zscript>

<zul:listbox >
<zul:listitem label="${each}" forEach="${hijos}" sclass="searchFields" /> </zul:listbox>


<zul:button label="ok" onClick='System.out.println("done")' />

Thanks
Maximo



delete flag offensive retag edit

24 Replies

Sort by ยป oldest newest

answered 2006-10-31 19:16:04 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3990228

By: nobody

I just found that if I replace $ by $ it works fine!

link publish delete flag offensive edit

answered 2006-10-31 19:19:31 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3990232

By: nobody

however, events are still not working... any hints?

link publish delete flag offensive edit

answered 2006-10-31 19:30:45 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3990247

By: nobody

I just realized that " was needed in the event code. Everything working now!

link publish delete flag offensive edit

answered 2007-05-17 23:46:38 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4318468

By: sademan

I do not know if I got zk installed right. I can view all of the zk pages that i make, but any events I make do not work(like: onClick or onChecked) here is the error message that I get:

Sourced file: line evaluation of: "cont.value = self.selectedItem.label;" Class or variable not found: self.selectedItem.label: at Line 1: in file: inline evaluation
of: "cont.value = self.selectedItem.label;" : self.selectedItem.label

If anyone can tell me what I should do to fix this it would be great.

link publish delete flag offensive edit

answered 2007-05-18 09:23:04 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319002

By: jumperchen

Could you provide more example code about your issue?

Thanks,
Jumper

link publish delete flag offensive edit

answered 2007-05-18 15:07:34 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319435

By: sademan

Something simple straight from the zkdemo does not work right. Like this:

<?xml version="1.0" encoding="UTF-8"?>


<window title="Radio Button and Checkbox Window" border="normal" width="400px">
<vbox>
Which kind of fruit do you want?
<radiogroup onCheck="fruit.value = self.selectedItem.label">
<radio label="Apple"/>
<radio label="Orange"/>
<radio label="Banana"/>
</radiogroup>
<hbox>You have selected :<label id="fruit"/></hbox>

<separator bar="true"/>
<checkbox id="apple" label="Apple" onCheck="doChecked()" />
<checkbox id="orange" label="Orange" onCheck="doChecked()" />
<checkbox id="banana" label="Banana" onCheck="doChecked()" />
<hbox>You have selected :<label id="fruit2"/></hbox>
<zscript>
void doChecked() {
fruit2.value = (apple.isChecked() ? apple.label+' ' : "")
+ (orange.isChecked() ? orange.label+' ' : "")
+ (banana.isChecked() ? banana.label+' ' : "");
}
</zscript>
</vbox>
</window>

With this code I get those errors when I select a button or check a box.

Thanks,
Brian

link publish delete flag offensive edit

answered 2007-05-18 15:16:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319453

By: jumperchen

Hi Brian,

It works for me.

What version do you use?
Or you can try to use latest version.

Regards,
Jumper

link publish delete flag offensive edit

answered 2007-05-18 15:16:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319453

By: jumperchen

Hi Brian,

It works for me.

What version do you use?
Or you can try to use latest version.

Regards,
Jumper

link publish delete flag offensive edit

answered 2007-05-18 15:16:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319453

By: jumperchen

Hi Brian,

It works for me.

What version do you use?
Or you can try to use latest version.

Regards,
Jumper

link publish delete flag offensive edit

answered 2007-05-18 15:16:41 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4319453

By: jumperchen

Hi Brian,

It works for me.

What version do you use?
Or you can try to use latest version.

Regards,
Jumper

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2006-10-31 19:10:16 +0800

Seen: 228 times

Last updated: May 23 '07

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More