jijo-paulose / zkgrails

Automatically exported from code.google.com/p/zkgrails
1 stars 0 forks source link

Comet not working under MVVM #339

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I using zkgrails 2.2.0 with grails 2.2.1

I create my comet with below code

class NotifyComet extends zk.grails.Comet {

    static trigger = [startDelay: 0L, every: 1000L]

    def beforeExecute = { desktop, page ->
    }

    def execute = { desktop, page ->
        //
        // 'delegate' is the composer this comet belongs to.
        // So, you can directly use components (and properties)
        // defined in the composer.
        //
        print 'hello notify'

        //sayButton.
    }

    def afterExecute = { desktop, page ->
    }
}

And I inject this comet into my ViewModel code like 

class HomeViewModel{
    def notifyComet

    @Init
    public void init(@ContextParam(ContextType.VIEW) Component view) {
        notifyComet.start()
    }

}

When I goto my home page ,It raise NullPointerException with message "Cannot 
get property 'desktop' on null object."

Original issue reported on code.google.com by zji...@gmail.com on 29 Jul 2013 at 3:16

GoogleCodeExporter commented 9 years ago
Thank you for reporting!

Original comment by chanwit on 29 Jul 2013 at 4:14

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 31 Jul 2013 at 9:51

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 6 Nov 2013 at 6:44

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 6 Nov 2013 at 6:45

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 27 Dec 2013 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 19 Jan 2014 at 8:00

GoogleCodeExporter commented 9 years ago

Original comment by chanwit on 4 Nov 2014 at 4:00