W3C home > Mailing lists > Public > www-forms@w3.org > September 2004

binding controls inside repeats

From: Swithun Crowe <swithun@swithun.com>
Date: Wed, 15 Sep 2004 08:55:55 +0100 (BST)
To: www-forms@w3.org
Message-ID: <Pine.LNX.4.58.0409150820050.2544@abednego.swithun.servebeer.com>

Does anyone know what exactly is supposed to happen when you have binds

<xforms:bind id="date_bind" nodeset="field/date"
<xforms:bind id="sector_bind" nodeset="field/sector"

and a repeat structure like:

<xforms:repeat nodeset="field">
  <xforms:select1 ref="@name">
    ... date ...
    ... sector ...

  <xforms:input bind="date_bind">

  <xforms:select1 bind="sector_bind">

The first select1 should cause one of the controls below it to be made
visible, and for each iteration of the repeat, it should be possible to
choose a different value for @name, thus displaying a different control.

But what happens (with XSmiles 0.82) is that the first top select1 in the
first iteration of the repeat controls all the others. If I choose
'sector' in the first set of controls then I get the select1 control, but
when I add another set of controls to the repeat and choose 'date' I still
have a select1 menu (and not an input box).

It looks like the binds are applying the relevance criterion to each node
in the nodeset based on just the first node in the nodeset. Is XSmiles
behaving properly here, or can anyone suggest another way of doing this?

What I would like the interface to do is offer the appropriate control
based on the value of the first select1 in the repeat, and for the user to
add sets of controls to the repeat and choose different values with the
first select1.

Many thanks.

Received on Wednesday, 15 September 2004 08:00:37 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:14 UTC