Announcement

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

    getValue() behaving differently in SelectItem with Multiple

    Hello Isomorphic,
    I am populating a selectItem (which is of type multiple) on the fly.
    I have a requirement to allow user to remove the selected items from selectItem .
    I use "getValue()" for it.
    So when i select more than 1 rows in selectItem it correctly gives me and "Array" of values . but if I select only 1 item , "getValue" gives me not an array but a String!
    How can this be handled?

    Is there any component in Form which I can use to set rows of values and then add or remove from it? (other than multiple select)

    Thanks
    himanshu Kapil

    #2
    Use isc.isA.String() and isc.isAn.Array() to detect Strings vs Arrays.

    Comment


      #3
      Originally posted by Isomorphic
      Use isc.isA.String() and isc.isAn.Array() to detect Strings vs Arrays.
      I was about to reply that I found this solution in Documentation.
      Thanks a lot

      Comment

      Working...
      X