2

XBL を使用して、XForm でさまざまなコントロールをレンダリングしています。これらの 1 つは、4 つのオプションを持つラジオ グループです。Appearance="full" とデータ自体の項目セットを使用しています。ただし、ラジオ グループがレンダリングされると、最後のオプションが選択されます。最初にどのボタンも選択されないように、これを削除する必要があります。

これを機能させるために、しばらくの間、ぐるぐる回っています。XForms の達人で、私がこれをどのように達成できるかを示す簡単な例を投稿していただければ、心から感謝いたします。

前もって感謝します。

4

1 に答える 1

2

This may be implementation-specific, but in general, the initial selected option depends on the initial instance data. This means: If the instance node the xforms:select1 is bound to is empty, and the xforms:itemset of the select1 doesn't contain an item with an empty value, no option will be selected. The same should be true if there's an initial instance value, but no item in the itemset with a corresponding value.

I've tested this with Orbeon, maybe other implementations behave else. Anyway, the described behaviour is described also in the XForms 1.1 Specifications (see the paragraphs starting with "For closed / open selections"), so i would expect it to be the default behaviour.

于 2011-07-27T14:00:08.770 に答える