Announcement

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

    Different setValue() behavior for multi-select item in 8.2 and 8.3

    Hi,

    We observe a behavior change for calling the setValue() method for the multi-select Item. If we passed in the multiple value as a comma-separated string, in 8.2 it works but in 8.3 it doesn't work. We notice in 8.3 it only work if we pass in an array of strings.

    We are using v8.2p_2013-03-04 and v8.3p_2013-06-11. This issue can be reproduced on both IE9 and FF12 in Feature Explorer with the following code.

    Steps to reproduce:

    Click the "setValue" button. In 8.2 it works but in 8.3 it doesn't work.

    Thanks!

    Code:
    isc.DynamicForm.create({
        width: 500,
        fields: [
            { ID: "multiSelect",name: "division",
             title: "Division",
             titleOrientation:"top",
             type: "select",
             
             valueMap: ["Marketing", "Sales", "Manufacturing", "Services"],
             multiple: true,
             multipleAppearance: "grid",
             width: 200
            }
        ]
    });
    isc.Button.create({
    top: 100,
    title:"setValue",
    click: function() {
    multiSelect.setValue("Marketing,Services");
    }
    });

    #2
    The new behavior is actually correct.
    Strings should not have been being split on commas with each part being treated as a separate value in multi-select items like this - it was essentially a coincidental behavior.

    Comment


      #3
      Understood that the new behaviour makes more sense but this goes on our list of things to modify in our code because of the upgrade. Just noting that this is again another backward compat issue. If by any chance our previous releases need a fix that is only in 8.3, we cannot simply change the library for them. This will become a huge issue. Hopefully we don't run into this situation!

      Comment


        #4
        Sorry, we should not have said "new behavior".

        The correct way to use this component was always to pass an array as the value. There is no "new behavior" in terms of what is documented, you just had incorrect usage that happened to work partially anyway.

        There is no backcompat issue either: you can change your code to use the correct approach and it works in both versions.

        Comment

        Working...
        X