-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all!
I'm new to zk and trying to add an Event to a programmatically created ListCell.
In a "CDATA-Block" of a *.zul-file I tried the following:
cell.setAttribute("onClick", "@command('showPreviewPopUp')");
I want the ListCell to react on the "showPreviewPopUp"-method of the model, which I have annotated with "@command", but i don't know, how to do this....
It would be very nice, if there is someone, who could help me....
Thnaks in advance!
Hi,
my two cents: avoid using too much scripting, use classes, more maintainable.
Does ListCell support onClick?
Yes i do agree on avoiding scripts.
You can refer this article also
http://www.javacodegeeks.com/2012/01/zk-web-framework-thoughts.html
@all: Thank you!!!
I made it work with using the EventListener which reacts on "Events.On_Click".
There was no other possibility than solving it with script-blocks. its ugly but i don't know how to handle it in another way...
Hm. Now i ran into another problem:
with "attribute name="onCreate"> I created two Eventlisteners (Events.ON_CLick and Events.ON_DOUBLE_CLICK), but now the problem is, that a "DoubleClick" is always handled as two separate clicks, so the action under "ON_DOUBLE_CLICK - Event" will never be fired....
has someone a hint?
Why not post your code?
For me it seems you write about the listbox.
Take event:
onSelect instead of onClick
so the doubleClick would work.
best
Stephan
Asked: 2012-11-05 12:32:19 +0800
Seen: 141 times
Last updated: Nov 07 '12