Announcement

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

    ID collides with ID of existing object

    I'm converting a GWT application that is a multi-layer tab control. One set of tabs contains individual tabs for similar part definitions. The "ID collides with ID of existing object" message in the log is puzzling as the form id and the column names supplied by code are not the same. The result is that the form with the original IDs is disabled - change events don't fire so fields don't get updated. I don't see any mention of this error on the forum or in a wider Google search. Please advise.

    #2
    Can you try opening the Dev Console and try searching for components with the given ID? Other than that, we'll probably need a simplified test case..

    Sanjiv

    Comment


      #3
      I am seeing this (from Dev Console): first form is created on tab page one with 8 TextItem fields and no warnings. When the second form is then added on a 2nd tab page, all of the ids for the TextItems are flagged as duplicates (such as isc_TextItem_79). I have resolved the problem with
      Code:
       setAttribute( "id", name );
      where name is a unique value that my application is already creating and using in the setName() method. My issue is resolved but not an explanation of why the ClassFactory would reuse ids on the same page.

      Comment


        #4
        Correction: the attribute is "ID" not "id"

        Comment


          #5
          This sounds similar to a problem that was present in SVN builds a couple of weeks ago. Please try the latest from SVN, if that doesn't fix it, we need to see a standalone test case to look into it.

          Comment


            #6
            Hi,

            I Use GWT 2.0.0 and smartgwt 2.0
            I have the same problem about IDs collisions.

            What I do and suppose :

            1)I create some "TextBoxField" in a dynamic form (TextBoxFields are generated by form.setUseAllDataSourceFields(true);)

            Each time a "TextBox" is created smartgwt assign to it an ID.

            2) After I create a listGrid and call listGrid.setShowFilterEditor(true);

            That's creates new TextBoxs to filter datas, but this creation use the same IDs than IDs created by TextBoxField in my form, then there are ID collisions.

            Then when I come back to my form TextBoxFields are unusable.

            I've tried to set new IDs by setAttribute("ID", myNewId) but that don't work in all of my cases. Because I think initials ID are used before I change them.

            I think setAttribute("ID", myNewId) look like a hack. I can put "." (dot) in ID that is not allowed.

            Do you have any ideas about this ?

            Thank you

            Clément
            Last edited by tam159; 15 Feb 2010, 06:43.

            Comment


              #7
              I see something like this, too.

              (Version is SC_SNAPSHOT-2010-02-14/EVAL)

              Comment


                #8
                To be more precise:

                - A create DynamicForm
                - I bind a DS
                - Then I go over the fields returned by DynamicForm.getFields(),
                collect some of them to an array, and I call DynamicForm.setFields() with
                this array.

                This gives me all kinds of collision errors.

                Comment


                  #9
                  It seems to me that the collision errors only occur when DynamicForm.setFields() with an array containing some FormItems returned by a previous call to DynamicForm.getFields().
                  This combination does not seem to work, but there is also no point in doing this. Now I just

                  - bind the DS
                  - set useAllDataSourceFields(true)
                  - create the formItems I want to override
                  - call setFields() to set the new fields (overrides + the rest)
                  - configure the formItems that I did not override (but see http://forums.smartclient.com/showthread.php?t=9823 about this last step.)
                  Last edited by csillag; 21 Feb 2010, 05:39.

                  Comment

                  Working...
                  X