开发者

XForms: How do I use a select1 to render a radio group with NO item selected

I am using XBL to render various controls 开发者_开发百科on my XForm. One of these is a radio group with 4 options. I am using appearance="full" and an itemset for the data itself. However, when the radio group is rendered, the last option is selected. I need to remove this so that none of the buttons are selected initially.

I've been going round in circles for a while trying to get this to work. If any of you XForms gurus could post a short example of how I can accomplish this I'd be eternally grateful.

Thanks in advance.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜