Announcement

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

    String displayed as array

    SmartGWT 2.4 IE 8

    When displaying a string in a listGrid, the string appears to be displayed as an array:

    {cm = {1=1, 130=1, 132=1, 134=1}}

    I don't think its illegal characters, I am only using letters and numbers.

    Anyone run into this before?

    #2
    This seems to only happen when I deploy it to my Jboss 5.1.0 server.

    It displays fine when running in Hosted Mode.

    Comment


      #3
      There's a core GWT bug that can cause this if you call toString() on something that is already a String. Look for such a call somewhere in the code before you deliver data to the grid.

      Comment


        #4
        I have a DMI class setup on my server which acts as the datasource to my listGrid.

        It looks like its converted into an array as soon as I add it to the datasource:

        Request #1 (DSRequest) payload: {
        values:{
        id:0,
        timestamp:"2011-09-22 10:04:07,985",
        myId:6,
        session:-373027854,
        name:{
        cM:{
        "1":1,
        "130":1,
        "132":1,
        "134":1
        }
        },
        command:"Request",
        commandStatus:"Sent",
        details:"My-Name sent"
        },
        operationConfig:{
        dataSource:"myQueueDMI",
        operationType:"add"
        },

        Comment


          #5
          please post your client site code.

          I had the same problem.
          Isomorphic is right. My problem was in toString().

          Comment


            #6
            I was able to get it to work by appending ""

            Comment


              #7
              Originally posted by rle125
              I was able to get it to work by appending ""
              instead of toString() ?

              that's right.

              In my case I had :
              Code:
              someTextItem.getValue().toString();
              I change it to :

              Code:
              someTextItem.getValueAsString();

              Comment


                #8
                Hi,

                I seem to have tried all things mentioned. It just doesn't work. Any help. I'm almost pissed off with this!!!!!!!!!

                Comment


                  #9
                  Here's the GWT bug for this. If it's affecting you, star it - that's one way they use to figure out how many people are being affected.

                  As far as how you still have a problem, you'll just need to isolate it to a small amount of code, and go over that carefully.

                  Comment

                  Working...
                  X