Search code examples
dojospring-js

Selected attribute ignored by Dojo/Dijit/SpringJS


I have the following source code for a select:

<select id="_conteneurNum_id" name="conteneurNum" data-dojo-type="dijit.form.FilteringSelect">
<option selected="selected" value="">Tous</option>
<option value="1">951</option>
<option value="2">753</option>
<option value="3">753159</option>
</select>

Which get rendered as follows:

rendering of form field

It seems that the selected attribute is ignored by Dojo/Dijit/SpringJS (notice that the user is first presented with a white label instead of "Tous".

Can anyone please help?


Solution

  • Are there any errors in the console?

    I have a fiddle that does exactly what you want with your code:

    http://jsfiddle.net/cswing/eJP3U/