Problem timer

asked 2014-07-29 12:06:27 +0800

wigberto gravatar image wigberto
52 4

Please, help with timer.. I have the following code:

<timer delay="${labels.timer.time}"
repeats="true" onTimer="@command('timer')" />

public void timer() throws JAXBException, ServiceException {

@NotifyChange({ "logsList", "slotsList", "statusSystem",
        "groupAsignationList" })
public void getStatusSystemActive() throws JAXBException, ServiceException {
    statusSystem = statusSystemService.getStatusSystem();
    errorXml = statusSystemService.isError();
    if (statusSystem != null) {
        if (statusSystem.getStatus().equals("STOP")) {
        } else {
        if (statusSystem.getEvento().equals("STOP")) {
            eventoSystem = true;
        } else {
            eventoSystem = false;
        if (statusSystem.getModo().equals("IN")) {
            modoSystem = true;
        } else {
            modoSystem = false;

But I do not achieve this "label" is updated. For example: if it has to put START and is in STOP, if the timer is executed the value does not update me to START.

Thank you.

value="@bind(vm.statusSystem.status eq 'START'?'START':'STOP')"
sclass="label-credentialAccount"                style="@bind(vm.statusSystem.status eq 'START'?'color:#076f0a; font-weight: bold':'color: #e03534; font-weight: bold')">
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-07-29 15:59:40 +0800

chillworld gravatar image chillworld flag of Belgium
5357 4 9

updated 2014-07-30 09:02:22 +0800

Hi Wigberto,

First of all remove all the notifyChange above the public void getStatusSystemActive() => they never will get notified cause it's no command or setter.

Secondly, I can't be sure but from your code I see that the status can be "STOP", but I never see "START" in your code.
I'll try to aid you with debugging.

Try changing the zul to :

<label value="@load(vm.statusSystem.status)"/>

See if it change and what the value's are.
If the value's never change => try add logging in the getter.
You could also add this at the end of your method. :


If that still don't work I do have a strong feeling that the status is just not changed. (try logging the status at the end of the method.)

Greetz chill.

link publish delete flag offensive edit


Hi Chill, when I execute the timer, I see that in the method getStatusSystem() i receive the change of value, but the .zul is not updated. For example, the first time that loaded the page .zul receipt ' START ' and when I execute the timer receipt ' STOP ' but it does not change the page. zul.

wigberto ( 2014-07-30 08:43:48 +0800 )edit

oke, so you get the change. Did you try changing the label to just the status and the bindutils workaround ?

chillworld ( 2014-07-30 09:06:07 +0800 )edit

I have added "BindUtils.postNotifyChange(null,null,statusSystem,"*");" and I have seen in debug that for in the line but it does not update .zul. Only it me works if I execute "Executions.sendRedirect (null);". Can it be that it has the same method in several tab and that's why is not it updated?

wigberto ( 2014-07-30 09:18:48 +0800 )edit

Normally not, do you use multiple vm's and is the comman din the same vm as the label?(pay attention for vm under another vm)

chillworld ( 2014-07-30 10:34:34 +0800 )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-07-29 12:06:27 +0800

Seen: 23 times

Last updated: Jul 30 '14

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