Announcement

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

    ListGrid text field not shown in Safari (Bug?)

    Hello,

    I use SmartGWT Power (SC_SNAPSHOT-2011-02-07/PowerEdition Deployment 2011-02-07)

    When I load my app, which shows a simple ListGrid, on (mobile and normal) Safari, some cells are blank. The ListGrid uses cellformatters, and the cellformatters that are like the one below, yield this not showing behavior.

    In Firefox it DOES work, ie. DOES show the data that is in them.

    Code:
    f.setCellFormatter(new CellFormatter() {
    	public String format(Object value, ListGridRecord record,
    			int rowNum, int colNum) {
    		if (value == null)
    			return null;
                     //convert < and >'s to &gt; etc.
    		String val = com.smartgwt.client.util.StringUtil.convertTags(
    				value.toString(), "", "");
    		return val;
    	}
    });
    Attached Files
    Last edited by Sytematic; 15 Feb 2011, 05:56.

    #2
    We'll need the original data value(s) where this is happening and what your formatter is returning.

    Comment


      #3
      I now tried hosted mode in Safari, and then it gives the error below. This should clear things up for you guys. It seems that the convertTags method, (java: com.smartgwt.client.util.StringUtil.convertTags()) is non-existent in the Safari version. Any String (whether it contains tags or not!) sent into the CellFormatter will trigger this. So to reproduce this, just attach the CellFormatter to any normal 'type="text"' ListGridField.

      (I never tried development mode on Safari before, only observed this bug in Deployed mode on Safari.)

      Code:
      10:18:05.851 [ERROR] [generatedcode] Uncaught exception escaped
      
      com.google.gwt.core.client.JavaScriptException: (TypeError): Result of expression '(new $wnd.String(str)).convertTags' [undefined] is not a function.
       line: 9
       sourceId: 4826564760
       expressionBeginOffset: 601
       expressionCaretOffset: 635
       expressionEndOffset: 651
          at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:237)
          at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:126)
          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:214)
          at sun.reflect.GeneratedMethodAccessor33.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:157)
          at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
          at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
          at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
          at java.lang.Thread.run(Thread.java:680)
      Last edited by Sytematic; 16 Feb 2011, 01:30.

      Comment


        #4
        Can you look in Safari's developer tools and verify that Safari is receiving up to date JavaScript files? This looks like a version mismatch between your SmartGWT files and the underlying SmartClient runtime, generally caused by caching.

        Comment


          #5
          It even happens in development mode, giving that stacktrace. I also tried some apps of mine with that CellFormatter that haven't been run in Safari before, so I don't think it's caching.

          What method would you reckon to use to verify that the latest JS is sent over. I really don't think this is what is causing the problem.

          Could you try to hook up the CellFormatter to a standard text ListGridField, of one of your test applications, and tell me if you can reproduce this?

          Comment

          Working...
          X