We added sparklines rendered with jquery suing the method described at
http://forums.smartclient.com/showthread.php?t=23447
Which works great, however, after the user freezes a column (using a ListGrid column heading menu), the spark lines disappear, and stop rendering from the redraw events.
It seems almost as if the observer added via JSNI (see above thread) as.
was removed when a column is frozen.
I expect I need to add a hook into column freezing that reestablishes the 'redraw' event observer.
I tried to override freezeField(String) and freezeField(int) and this didn't work. I also tried to add a drawHandler and field state change listeners that referenced in the above comments, but these did not solve my 'freezing' problem.
Ideas?
Using SmartGWT 3.1
SmartClient Version: v8.3p_2012-12-02/Enterprise Deployment (built 2012-12-02)
http://forums.smartclient.com/showthread.php?t=23447
Which works great, however, after the user freezes a column (using a ListGrid column heading menu), the spark lines disappear, and stop rendering from the redraw events.
It seems almost as if the observer added via JSNI (see above thread) as.
Code:
// "this" extends ListGrid public void addSparklines(){ DrawHandler dh = new DrawHandler() { @Override public void onDraw(DrawEvent drawEvent) { configureSparklines(); } }; FieldStateChangedHandler fsch = new FieldStateChangedHandler(){ @Override public void onFieldStateChanged(FieldStateChangedEvent fieldStateChangedEvent) { configureSparklines(); } }; addDrawHandler(dh); // <-- works until column is frozen addFieldStateChangedHandler(fsch); // <-- not useful getGridRenderer().addDrawHandler(dh); // <-- not useful } public native void configureSparklines()/*-{ console.log('called ConfigureSparklines'); var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()(); var body = self.body; if (body == null) return; self.observe(body, "redraw", "GppHistograms.update()"); body.redraw(); }-*/;
was removed when a column is frozen.
I expect I need to add a hook into column freezing that reestablishes the 'redraw' event observer.
I tried to override freezeField(String) and freezeField(int) and this didn't work. I also tried to add a drawHandler and field state change listeners that referenced in the above comments, but these did not solve my 'freezing' problem.
Ideas?
Using SmartGWT 3.1
SmartClient Version: v8.3p_2012-12-02/Enterprise Deployment (built 2012-12-02)
Comment