Announcement

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

    ListGrid don't show rows in Chrome

    Eclipse + GWT Plugin, Smart GWT 2.0, Google Chrome 4.0.288.1 dev (and previous).

    Code:
    ListGrid catsGrid = new ListGrid();
            catsGrid.setEmptyMessage("Load...");
            catsGrid.setWidth("30%");
            
            ListGridField nameField = new ListGridField("name", "Category");
            catsGrid.setFields(new ListGridField[] {nameField});
            
            String result="{\"error\": null, \"id\": 1, \"result\": [{\"name\": \"\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442\"}, {\"name\": \"\u0418\u0441\u0442\u043e\u0440\u0438\u044f \u043e\u0446\u0435\u043d\u043e\u043a\"}]}";
            JSONValue value = JSONParser.parse(result).isObject().get("result");
            JSONArray catsAry = value.isArray();
            JavaScriptObject jsObj = catsAry.getJavaScriptObject();
            Record[] recs = Record.convertToRecordArray(jsObj);
    
            catsGrid.setData(recs);
            catsGrid.draw();
    ListGrid.setData() works ok in debug mode with Chrome GWT plugin (categories is visible).
    But after compile with GWT Eclipse plugin application in Chrome show only first empty row. Other browser work correctly (IE 7, Last Firefox, Opera 10).
    Last edited by Vermus; 14 Jan 2010, 02:57.

    #2
    no one has encountered this problem?

    ps. developer console in debug logging mode does not show anything strange.
    pps. Safari 4.0.4 also don't show rows. I think so, the problem in the browser with webkit engine.
    Last edited by Vermus; 14 Jan 2010, 02:36.

    Comment


      #3
      I found the problem. It is a function Record.convertToRecordArray.
      Precisely in the condition "if (JSOHelper.isArray (nativeArray))".

      Code:
          
      public static native boolean isArray (JavaScriptObject jsObj )/*-{
              return $ wnd.isA.Array (jsObj);
          }-*/;
      In hosted mode the function isArray returns true, but after compiling in browsers with webkit returns false in my case.

      Comment


        #4
        Many features, which are clearly working, depend upon that function retunring correct results. If you think there's a flaw in a specific case, create a standalone test case for it.

        Comment


          #5
          I also got the same problem too.

          Anyone who know how to workaround it?

          Originally posted by Vermus
          I found the problem. It is a function Record.convertToRecordArray.
          Precisely in the condition "if (JSOHelper.isArray (nativeArray))".

          Code:
              
          public static native boolean isArray (JavaScriptObject jsObj )/*-{
                  return $ wnd.isA.Array (jsObj);
              }-*/;
          In hosted mode the function isArray returns true, but after compiling in browsers with webkit returns false in my case.

          Comment

          Working...
          X