Redraw widget in client side

asked 2015-01-14 02:54:54 +0800

JustinFrost gravatar image JustinFrost
145 1 6

Hi All,

I create a custom component. The mold is as follows:

out.push('<div class="'+this.$s("buttons")+'">');
if (this.isShowMinimise()){
    out.push('<div class="', this.$s('buttons-minimise'), '"></div>');  

This works when the component is attached to the dom. But when the showMinimise property is updated I need to redraw the widget so that the div for minimised is added or removed.

I know there is a redraw method on Widget, but I am not sure which array I am meant to be passing to this...


delete flag offensive retag edit


you don't need to use redraw method. just write some code into setter "showMinimise" of your widget to dynamically change visible property for your minimise button.

JerryChen ( 2015-01-15 06:56:04 +0800 )edit

Hi Jerry, Yes I was aware of this option, however I wanted to remove the div from the dom if the property was false so I thought it would be easier to execute redraw. I ended up adding/remove the div using jquery in the setter. Thanks.

JustinFrost ( 2015-01-19 23:35:08 +0800 )edit
Be the first one to answer this question!
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: 2015-01-14 02:54:54 +0800

Seen: 13 times

Last updated: Jan 14 '15

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