Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Missing JS method getFilterEditorCriteriaAsAdvancedCriteria in ListGrid

    Hi Isomorphic,

    please see this BuiltInDS-based testcase (using v10.0p_2015-11-18/PowerEdition).

    BuiltInDS.java:
    Code:
    package com.smartgwt.sample.client;
    
    import com.google.gwt.core.client.EntryPoint;
    import com.smartgwt.client.core.KeyIdentifier;
    import com.smartgwt.client.data.DataSource;
    import com.smartgwt.client.util.Page;
    import com.smartgwt.client.util.PageKeyHandler;
    import com.smartgwt.client.util.SC;
    import com.smartgwt.client.widgets.IButton;
    import com.smartgwt.client.widgets.events.ClickEvent;
    import com.smartgwt.client.widgets.events.ClickHandler;
    import com.smartgwt.client.widgets.grid.ListGrid;
    import com.smartgwt.client.widgets.layout.VLayout;
    
    public class BuiltInDS implements EntryPoint {
        private VLayout layout = new VLayout(10);
        private ListGrid boundList;
        private IButton showFilterSettingsBtn;
        private IButton getFilterSettingsBtn;
        private IButton getFilterSettings2Btn;
    
        public void onModuleLoad() {
            KeyIdentifier debugKey = new KeyIdentifier();
            debugKey.setCtrlKey(true);
            debugKey.setKeyName("D");
    
            Page.registerKey(debugKey, new PageKeyHandler() {
                public void execute(String keyName) {
                    SC.showConsole();
                }
            });
    
            boundList = new ListGrid(DataSource.get("animals"));
            boundList.setHeight(500);
            boundList.setWidth(800);
            boundList.setAutoFetchData(false);
            boundList.setShowFilterEditor(true);
            layout.addMember(boundList);
    
            showFilterSettingsBtn = new IButton("showFilterEditor");
            showFilterSettingsBtn.setWidth(200);
            showFilterSettingsBtn.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    boundList.setShowFilterEditor(!boundList.getShowFilterEditor());
                }
            });
            layout.addMember(showFilterSettingsBtn);
    
            getFilterSettingsBtn = new IButton("getFilterEditorCriteria");
            getFilterSettingsBtn.setWidth(200);
            getFilterSettingsBtn.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    SC.say(boundList.getFilterEditorCriteria().asAdvancedCriteria().asString());
                }
            });
            layout.addMember(getFilterSettingsBtn);
    
            getFilterSettings2Btn = new IButton("getFilterEditorCriteriaAsAdvancedCriteria");
            getFilterSettings2Btn.setWidth(200);
            getFilterSettings2Btn.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    SC.say(boundList.getFilterEditorCriteriaAsAdvancedCriteria().asString());
                }
            });
    
            layout.addMember(getFilterSettings2Btn);
            layout.draw();
            boundList.fetchData();
        }
    }
    Click the last button to see this in the DevMode log:
    Code:
    19:44:36.668 [ERROR] [builtinds] Uncaught exception escaped
    
    com.google.gwt.event.shared.UmbrellaException: Exception caught: (TypeError) @com.smartgwt.client.widgets.grid.ListGrid::getFilterEditorCriteriaAsAdvancedCriteria()([]): self.getFilterEditorCriteriaAsAdvancedCriteria is not a function
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
        at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:299)
        at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
        at java.lang.Thread.run(Unknown Source)
    Caused by: com.google.gwt.core.client.JavaScriptException: (TypeError) @com.smartgwt.client.widgets.grid.ListGrid::getFilterEditorCriteriaAsAdvancedCriteria()([]): self.getFilterEditorCriteriaAsAdvancedCriteria is not a function
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:252)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.smartgwt.client.widgets.grid.ListGrid.getFilterEditorCriteriaAsAdvancedCriteria(ListGrid.java)
        at com.smartgwt.sample.client.BuiltInDS$4.onClick(BuiltInDS.java:62)
        at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:111)
        at com.smartgwt.client.widgets.events.ClickEvent.dispatch(ClickEvent.java:1)
        at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
        at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
        at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
        at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
        at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
        at com.google.gwt.user.client.ui.Widget.fireEvent(Widget.java:129)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:341)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:222)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:137)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:589)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:293)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
        at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
        at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:299)
        at sun.reflect.GeneratedMethodAccessor45.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
        at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:72)
        at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:296)
        at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:551)
        at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:368)
        at java.lang.Thread.run(Unknown Source)
    Compiled I get the same in the Developer Console.

    Is myListGrid.getFilterEditorCriteriaAsAdvancedCriteria() supposed to be the same as myListGrid.getFilterEditorCriteria().asAdvancedCriteria()?
    If not, could you please explain the difference?

    Best regards
    Blama

    #2
    Just a note to say we do see this problem and are investigating. We'll let you know when we have a resolution.

    Regards
    Isomorphic Software

    Comment

    Working...
    X