-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hello,
I have w:onClick on a button which executes a custom javascript and sets value of a different widget:
i.e. this.$f('is123').setValue( javascript_computation );
After the javascript finishes and I inspect the value of 'id123' in a composer, the value is unchanged.
In version 3.6.5, I used comm.sendEvent
, however that is unavailable in version 5.
Thanks for your help.
Hello abcd123,
The solution to your problem is that you have to fire an event to the widget. For more information please look at the following url's:
http://books.zkoss.org/wiki/ZKClient-sideReference/Communication/AURequests/Client-sideFiring
http://ben-bai.blogspot.gr/2013/06/zk-cdt-fire-event-to-server-to-create.html
Best Regards,
Darksu
How one would do that when changing a label value ? I added an event listener on the widget for a textarea in a custom component
textArea.setWidgetListener(Events.ON_CHANGING, "this.nextSibling.firstChild.setValue(event.data.value.length)");
To update a label with a counter. But on the server side, the value of the counter is never updated. And I've a button which call the server and , among other things, clear the textarea of the component, and thus I want to reset the counter label to 0 but since server side it's still 0 it nevers updated the value on the front ...
The idea was to use a front side listener to avoid adding the listener on java side ... and maybe avoid calling the server on each onChanging of the textarea.
Asked: 2014-09-22 08:50:32 +0800
Seen: 33 times
Last updated: Dec 07 '16
Id attribute set in zul code doesn't reflect in html code? [closed]
passing present viewmodel to included page. [closed]
Upload Button dosn't work on chrome
How to handle big (large) file upload?
ZK and Dynamic Component And DataBinder
Attributes in macro was not updated after notifyChange
Problem binding values to a composite component
How to access static member field of a class in zul without zscript