0

Problem with Checkbox [closed]

asked 2005-11-28 11:32:39 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

Why does the checkbox not act the same as the button for attaching the event?
I am using onCheck for checkbox, but it does not do anything. Is this a bug?

<window id="myWindow" title="more event listener demo" border="normal">
<label id="myLabel" value="Hello, World!"/>
<button id="myButton" label="Change label"/>
<checkbox id="myCheckbox" label="Change label"/>
<script>
private class ClickEventListener implements EventListener {
public boolean isAsap() {
return true;
}
public void onEvent(Event event) throws UiException {
if (event instanceof MouseEvent) {
event.target.getFellow("myLabel").setValue("Hello, Event!");
}
}
}
myCheckbox.addEventListener("onCheck", new ClickEventListener());
myButton.addEventListener("onClick", new ClickEventListener());
</script>
</window>


delete flag offensive retag edit

The question has been closed for the following reason "question is off-topic or not relevant" by sjoshi
close date 2013-02-08 07:43:53

3 Replies

Sort by ยป oldest newest

answered 2005-11-28 13:05:51 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

No that is not the case anymore. All of a sudden, my checkboxes started to respond to onCheck. It worked in FF and IE.
By the way, I noticed that if a window is set invisible, and a doOverlapped() is called on it, it makes the window visible. Is this intended?

link publish delete flag offensive edit

answered 2005-11-28 13:29:00 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

Yes, doOverlapped, doModal and doEmbeded will cause it visible.

link publish delete flag offensive edit

answered 2005-11-29 06:24:38 +0800

admin gravatar image admin
18691 1 10 129
ZK Team


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

By: nobody

Ok there is indeed a problem with checkbox. The problem is this. The onCheck event is raised only if clicked on the checkbox itself and not on the label.
For example, if I have:

[X] Label

Clicking on the [X] produces the onCheck event, but not on the Label, but clicking on Label does make the [X] toggle. I think this is a very simple bug and can be fixed by propagating the event handler to the label. Hope this bug get fixed soon!

link publish delete flag offensive edit

Question tools

Follow

RSS

Stats

Asked: 2005-11-28 11:32:39 +0800

Seen: 1,271 times

Last updated: Nov 29 '05

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