Update vBox

asked 2014-03-26 10:04:22 +0800

wigberto gravatar image wigberto
52 4

How can I create a timer so that it is updated vbox and to be able to change the icon depending on the status? Now I have it like in the example, but I don´t know it must be "updateVox" Example:

                            <vbox id="statusSystemVbox">
                                <button id="isStatusStopButton"
                                    onClick="@command('activeSystem', status='STOP')"
                                    if="${vm.isStatusSystem == true}">
                                <button id="isStatusStartButton"
                                    onClick="@command('activeSystem', status='PLAY')"
                                    if="${vm.isStatusSystem == false}">
                            <timer id="timerVbox"
                                delay="${labels.timer.time}" repeats="true"
                                onTimer="@command('updateVbox')" />
delete flag offensive retag edit

2 Answers

Sort by » oldest newest most voted

answered 2014-03-26 10:23:25 +0800

chillworld gravatar image chillworld flag of Belgium
5322 4 9

updated 2014-03-26 11:58:57 +0800

In your command updateVbox you shall notify all the things that could have changed. Bind the source of your images to your vm.

Like this :

@NotifyChanged ({"isStatusSystem","sourceIcon"})
public void updateVbox () {
  // change here the source if it must be changed.  

edit :

<button src="@load(vm.sourceIcon)" onClick="@command('openWindow')">

or when it's in an other object and where only that object has a getter :

<button src="@load(vm.object.sourceIcon)" onClick="@command('openWindow')">
link publish delete flag offensive edit


Thank you.

wigberto ( 2014-03-27 14:33:30 +0800 )edit

answered 2014-03-26 11:22:14 +0800

wigberto gravatar image wigberto
52 4

how do I bind the sourceIcon with vm?

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: 2014-03-26 10:04:22 +0800

Seen: 15 times

Last updated: Mar 26 '14

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