Announcement

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

    self.getSelectedRecord is not a function

    PowerEdition: Nightly 2011-11-08, firefox 7.0.1

    I fetch some data from a listgrid, and when it's done, I put a sort on it, in the filter editor. This way, the user gets an initial view, but is still able to remove the filter in the filter editor above the grid.

    I do this as follows.
    Code:
    this.grid.fetchData(new Criteria(), new DSCallback() {
    	public void execute(DSResponse response, Object rawData,
    				DSRequest request) {
    
                    grid.sort("startDate", SortDirection.ASCENDING);
    		
    		Date d = new Date();
    		long time = d.getTime();
    		time = time - 7*24*60*60*1000; //put week back
    		d.setTime(time);
    		AdvancedCriteria crit = new AdvancedCriteria(OperatorId.AND,
    				new Criterion[] {
    				     new Criterion("startDate", OperatorId.GREATER_OR_EQUAL, d)        
    				}
    		);
    		grid.setFilterEditorCriteria(crit);
    		grid.filterByEditor();
        }
    });
    This, however, throws the following exception.

    Code:
    15:38:05.067 [ERROR] [generatedcode] Uncaught exception escaped
    com.google.gwt.core.client.JavaScriptException: (TypeError): self.getSelectedRecord is not a function
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:248)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
        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:213)
        at sun.reflect.GeneratedMethodAccessor67.invoke(Unknown Source)
        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:172)
        at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
        at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
        at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
        at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:289)
        at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
        at com.smartgwt.client.widgets.grid.ListGrid.setFilterEditorCriteria(ListGrid.java)
        at nl.sytematic.projects.Technicom.client.custom.LectureCustomGridInitialization.postProcess(LectureCustomGridInitialization.java:25)
        at nl.sytematic.projects.Technicom.client.views.LectureRichTableView$16.execute(LectureRichTableView.java:1298)
        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.OophmSe
    Any idea what is going wrong? Is this a regression in a latest nightly, cos if i remember correclty this didnt happen before.

    Eager to know!

    #2
    For any JavaScript error, be sure to post the stack trace from the Developer Console (see FAQ). If you're not seeing one, please give us a way to reproduce the problem.

    Comment


      #3
      Alright, but what would you recommend if something only happens in deployed mode?

      I see some white screens in my app now and then, across all browsers, but never seen this in development mode. So I want to figure out what's going wrong there...

      Comment


        #4
        [edited - sorry, wrong thread]
        You can use the Developer Console in both compiled and development mode, in both case it logs a stack trace, and the FAQ actually tells you compiled mode is preferred.
        Last edited by Isomorphic; 8 Nov 2011, 10:04.

        Comment

        Working...
        X