Kostis,
> (I hope that i'm not becoming too anoying...)
>
On the contrary, it's very interesting to know what points have to be
improved from your point of view.
> I think thar the xf:select are now much improved, but there is still 1
> minor problem that needs to be fixed:
>
> PROBLEM
> ----------------
> On a xf:select1 control with 'minimal' appearence that gets its
> pick-list from xf:itemset,
> When the itemset gets updated and results with only a single item,
> the user cannot select that single item.
>
>
> Note that when itemset gets updated with multiple-items, the problem
> is still there,
> but with the 1st pick-list item this time.
>
> In that case though, the user can interactively workaround it,
> by selecting first a different item (i.e. the 2nd), and then selecting
> back the 1st one,
> in order to properly set the underlying node-value.
>
> Reported against rev372, Chrome, Firefox, IE.
>
>
> SOLUTION
> ----------------
> To workaround it with xforms-code, an action like the one below maybe
> attached on some itemset-update event (i.e 'submit-done' event):
> <xf:setvalue bind="/items/item[1]" if="note(/items/items[2])"
> /><!-- auto-select single-items -->
> But for some undetermined reason i can't make this trick to work on
> all xforms...
>
>
> Nevertheless, i think the correct behavior for when the itemset gets
> updated should either be:
>
> a) to insert a 'null' item and set it preselected on the pick-list,
> which whould be auto-deleted after the first user-selection
> (this is the current behavior of the xf:select1 after the initial
> model construction)
>
> b) or pre-select the single item, as similar to the workaround
> exemplified above, or .
>
>
> I would prefer the former solution (a), since it fixes the behavior
> even when pick-list has many items, and because it provides for
> implementing both choices to developers.
>
>
XSLTForms is now only based on HTML select and, as you noticed, it isn't
perfect. Other XForms implementations usually have the behavior you're
describing.
This has not yet been a priority for XSLTForms because, at least, 1 or 2
work days are required...
Thanks!
-Alain
|