Hi,
I want to use multilevel sorting in ListGrid. I am writing following code for this but while running application and clicking on MultiLevel Sort button I am getting this exception. Please help me for this.
code:
positionGrid.setCanMultiSort(true);
positionGrid.setDataSource(DataSource.get("positionView"));
IButton sortButton = new IButton("Multilevel Sort");
sortButton.setWidth(120);
sortButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
try {
MultiSortDialog.askForSort(positionGrid, positionGrid.getSort(), new MultiSortCallback() {
@Override
public void execute(SortSpecifier[] sortLevels) {
if(sortLevels != null) {
positionGrid.setSort(sortLevels);
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
});
Exception:
com.google.gwt.core.client.JavaScriptException: (TypeError): self.getSort is not a function
fileName: http://localhost:8888
lineNumber: 1594
stack: ()@http://localhost:8888:1594
@:0
([object GWTJavaObject],131220,[object GWTJavaObject])@http://localhost:8888/cmps_pw/hosted.html?cmps_pw:56
([object Object],(void 0))@http://localhost:8888:1826
([object Object],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Foundation.js:308
([object Object],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Foundation.js:310
([object Object],"click")@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1446
([object Object])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1307
([object MouseEvent],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1294
([object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1285
((function (_1, _2) {var _3 = isc.EH;if (isc.Browser.isIE && !_3.$j6) {var _4 = _3.lastEvent;_4.eventType = _3.MOUSE_DOWN;_3.handleMouseDown(null, _3.lastEvent);}if (!_2) {_3.$ku = true;}var _5 = _3.$k5(_1, _2);_3.$ku = false;if (isc.Browser.isSafari) {_5 = true;}return _5;}),[object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1506
anonymous([object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:54
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.smartgwt.client.widgets.grid.ListGrid.getSort(ListGrid.java)
at com.smartgwt.pw.client.CenterStack$2.onClick(CenterStack.java:181)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:97)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
I want to use multilevel sorting in ListGrid. I am writing following code for this but while running application and clicking on MultiLevel Sort button I am getting this exception. Please help me for this.
code:
positionGrid.setCanMultiSort(true);
positionGrid.setDataSource(DataSource.get("positionView"));
IButton sortButton = new IButton("Multilevel Sort");
sortButton.setWidth(120);
sortButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
try {
MultiSortDialog.askForSort(positionGrid, positionGrid.getSort(), new MultiSortCallback() {
@Override
public void execute(SortSpecifier[] sortLevels) {
if(sortLevels != null) {
positionGrid.setSort(sortLevels);
}
}
});
} catch (Exception e) {
e.printStackTrace();
}
}
});
Exception:
com.google.gwt.core.client.JavaScriptException: (TypeError): self.getSort is not a function
fileName: http://localhost:8888
lineNumber: 1594
stack: ()@http://localhost:8888:1594
@:0
([object GWTJavaObject],131220,[object GWTJavaObject])@http://localhost:8888/cmps_pw/hosted.html?cmps_pw:56
([object Object],(void 0))@http://localhost:8888:1826
([object Object],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Foundation.js:308
([object Object],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Foundation.js:310
([object Object],"click")@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1446
([object Object])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1307
([object MouseEvent],(void 0))@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1294
([object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1285
((function (_1, _2) {var _3 = isc.EH;if (isc.Browser.isIE && !_3.$j6) {var _4 = _3.lastEvent;_4.eventType = _3.MOUSE_DOWN;_3.handleMouseDown(null, _3.lastEvent);}if (!_2) {_3.$ku = true;}var _5 = _3.$k5(_1, _2);_3.$ku = false;if (isc.Browser.isSafari) {_5 = true;}return _5;}),[object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:1506
anonymous([object MouseEvent])@http://localhost:8888/cmps_pw/sc/modules/ISC_Core.js:54
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:195)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
at com.smartgwt.client.widgets.grid.ListGrid.getSort(ListGrid.java)
at com.smartgwt.pw.client.CenterStack$2.onClick(CenterStack.java:181)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:97)
at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.smartgwt.client.widgets.BaseWidget.fireEvent(BaseWidget.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessages(BrowserChannel.java:1668)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:401)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Thread.java:619)
Comment