Skip to Content
avatar image
Former Member

combox box bug?

hi gurus,

we found out that for a combox control, if there are two entries , with different values , but with same display text, the selected index will always set to the first one, is that a bug or we did something wrong?

for example

-


value text

-


001 apple

002 orange

003 apple

even if you select apple, the selected index will always set to entry 001, 0 to be exactly.

br.

zj

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • avatar image
    Former Member
    Apr 30, 2009 at 02:42 PM

    what would be the point of having 2 entries with the exact same description?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      hi,

      we are using combo box to simulate a tree control

      Node 1

      option 1

      option 2

      node 2

      option 1

      option 2

      so , there are some entries have same text.

      br.

      zj

  • avatar image
    Former Member
    Apr 30, 2009 at 08:44 PM

    Hi Jun,

    I think you use the change event and the script: this.boundItem(xfa.event.newText)

    It can't work if you have items with the same Text.

    Try to use the following javaScrip for the enter event:

    var myEnterRawValue=this.rawValue;

    JavaScript for the exit event:

    if (myEnterRawValue!=this.rawValue) {
      // your code (use this.rawValue)
    }

    Regards

    Michal

    Add comment
    10|10000 characters needed characters exceeded