PiRSquared17 / zkgrails

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

Can't set the model on a chart if you select chart using jQuery selector #347

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of ZKGrails you're using? On what operating system?
2.2.7, Windows 7 64-bit

Which version of Grails you're using?
2.2.7

What steps will reproduce the problem?
1. select a chart using jQuery
2. call the setModel on the selected chart (e.g $("chart").setModel(model))
3.

What is the expected output? What do you see instead?
Expected: Expected to update the model properly.

Actual: The model is not updated

Please provide any additional information below. Attaching a test case to
reproduce it is preferable.

Suggestion:
   def setModel(model) {
        if(components.size() == 0)
            return this

        def comp = components?.get(0)
        if(comp.hasProperty('model')) {
            comp.model = model
            if(comp.hasProperty('multiple')) {
                model.setMultiple(comp.multiple)
            }
            comp.invalidate()
        }

        return this
    }

Original issue reported on code.google.com by kyungeui81@gmail.com on 8 Sep 2013 at 3:49

GoogleCodeExporter commented 9 years ago
Thank you for reporting!

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

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