Announcement

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

    BUG in ComboBoxItem and displayValue

    Steps to reproduce:

    Take sample Local and Databound Combobox sample:

    -1-
    Modify itemName to:
    itemName.setValueField("itemID");
    itemName.setDisplayField("itemName");
    itemName.addChangedHandler(new ChangedHandler() {
    public void onChanged(ChangedEvent event) {
    itemName.getSelectedRecord();
    }
    });

    -2-
    Search in itemName by text. For example 'Mo' and select mouse holder
    -3-
    Open the comboboxlist and the displaytext is changed to the valueField (the ItemID)

    Notes: The problem is with the getSelectedRecord() on the onchange. If you remove it there is no problem.

    Tested in IE9, Chrome 13
    SmartGWT 2.4
    GWT 2.3
    SmartGWT log empty for default logging preferences.

    #2
    I really don't understand you problem.

    But you should try retrieve the selected record from the ChangedEvent attribute

    Comment


      #3
      If you reproduce it with the instructions you will see clearly the error:
      When you first select the register the displayField is displayed but after -3- the displayField is magically changed for the Id field and description is lost.

      And abouut changedEvent the problem is that it doesn't contains all the information (all the fields from the optionDatasource) and also you can't differenciate while the user is typing the search value with a final correct selected value)

      Comment


        #4
        Im not seeing any itemID in the .data.xml

        Comment


          #5
          It's not in XML but it's in the ItemSupplyXmlDS.
          But you can use the field you want, to reproduce you only need to have a valueField and displayField that are different.

          Comment


            #6
            Sorry, im out of time for running that showcase example.
            But give a try with event.getItem.getSelectedRecord(), and the problem persists ?

            Comment


              #7
              The problem is also reproduced if you use event.getItem().

              Can someone on Isomorphic confirm the bug to open it in google code page?

              A lot of thanks in advance,

              Comment

              Working...
              X