Announcement

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

    DSRequest data

    Is there any other way to send request data back to the server when calling fetch for listgrid? When I pass data in like the code below, I get really odd values in the server-side like:

    {criteria={cwFetchType={java_lang_Object_castableTypeMap$={1=1, 50=1, 51=1, 83=1}}}

    Code:
     listGrid.fetchData(null, null,{showPrompt:false,data:{"cwFetchData":"$dfn"}});
    I should add that this functionality works if I run the application in GWT hosted mode. Am I doing something wrong? Or does this seem like a GWT bug?

    #2
    This is definitely some kind of GWT bug. One thing we encountered with SmartGWT is that some GWT APIs that are supposed to return String will actually return what's called a "String Object" in JavaScript, which is not quite a normal String. This happens if, for example, in your Java code you call toString() on an object that is already a String.

    Comment


      #3
      That's exactly what the problem was in my original code "$dfn" was a string variable value I had called toString() for then passed it into JSNI.. Doesn't explain why when I pass a static "$dfn", it also doesn't work. Anyway, it works now. Thanks for the info.

      Comment

      Working...
      X