0

I want to display special spanish characters like á,Á,ã,Ã in combobox.SO, I wrote the code for it in locale file, Inglés and Español,etc. When I open the dropdown, it displays the word correctly but when I select it, it displays the code in the box. Similar thing happens with boxLabels, it shows the code instead of the special character. Can anyone suggest me a solution for it? Thank you.

enter image description here

enter image description here

enter image description here

user2316489
  • 159
  • 1
  • 5
  • 14
  • Can you post your code? I'm interested in the values of the id versus the value of the combo, and what the value becomes after "select". – JustBeingHelpful Nov 03 '14 at 06:44

1 Answers1

1

The problem occurs because elements on list are rendered as divs (so html entities works) while value box is rendered as input (entities dosen't work). Easiest way is to display national characters is to replace entities with actual unicode chars. You can do that by overriding setRawValue method:

Ext.define('Ext.ux.form.ComboBox', {
    extend: 'Ext.form.ComboBox',
    setRawValue: function(value) {
        this.callParent([ decodeEntities(value) ]);
    }
});

Fiddle: http://jsfiddle.net/9mjbf96o/2/

Krzysztof
  • 15,900
  • 2
  • 46
  • 76