How to fire a Custom event onSetContent on an Image upon setContent by server.

asked 2016-12-19 07:05:34 +0800

delpan gravatar image delpan

The Captioned problem needs to be addressed because of a workaround that i am working on that involves whenever i zoom in my image in Image component ,i.e. setContent to it then i should have the horizontal scroll set to the right.This involves a textbox at that corner and after i setcontent to the image i do txtbx.setFocus(true); This only work randomly and not very often because server updates the Image Content after i have set focus and hence it fails.However this would work if i set focus to the textbox only and only when i successfully update the client Image with the new zoomed content ,so for that i need to listen to some event like onSetContent and the do txtbx.setFocus(true); ,only if it is possible to do so.

This is just a workaround as nothing else could be found. I am usign zk 5. If any other methods or any other workarounds are there to achieve this,please suggest.


delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2016-12-29 11:09:51 +0800

delpan gravatar image delpan

Using client side javascript's onload on the Image component, i was able to listen on everytime the src of the same Image Object is changed.

link publish delete flag offensive edit
Your answer
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

1 follower



Asked: 2016-12-19 07:05:34 +0800

Seen: 31 times

Last updated: Dec 29 '16

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