Re: [Xsltforms-support] select1 dynamic loading : setting the default?
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2009-11-28 14:46:22
|
Hi, > The select1 populates with the name/value pairs as expected and shows the first item in the select1 list; however - on load, the first item isn't selected by default. The user would need to activate the select1 control and select something before the element contained anything. > XSLTForms select1 control behavior has to be improved so, as other XForms implementations do, an empty value is displayed when no item is, yet, selected. This empty value shouldn't be accessible as soon as an item has been selected. This is not standard HTML SELECT behavior... > I think I can use xf:setvalue when the document is ready to make all the default selections but I was wondering whether select1s should automatically select the first item in a list in cases like this? > No, this has to be considered this way: a select1 control shows which item value is binded with it. An xf:setvalue has to be used to initialize an instance value if required (on "xforms-model-construct-done" event, for example) but there cannot be a default selected value for a select1 control. -Alain |