W3C home > Mailing lists > Public > www-forms@w3.org > October 2005

Re: reload select when selection changes in linked select

From: John Boyer <boyerj@ca.ibm.com>
Date: Mon, 17 Oct 2005 08:29:27 -0700
To: Steve Heron <steven.heron@gmail.com>
Cc: www-forms@w3.org, www-forms-request@w3.org
Message-ID: <OF4495FCEA.8B806068-ON8825709D.00540E4F-8825709D.0055179E@ca.ibm.com>
Hi Steven,

Sounds like you need the typical dynamic UI binding feature of XForms. 
Say you have the following instance data:

    <list id='A' name="List A"> <model name='a'/> ...</list>
    <list id='B' name="List B"> ...</list>
    <list id='C' name="List C"> ...</list>

You could then use the following selectors:

<select1 ref="manufacturer">
     <label>Car Manufacturer:</label>
     <itemset nodeset="list">
            <label ref="@name"/>
            <value ref="@id"/>

<select1 ref="modelName">
     <itemset nodeset="list[@id=../manufacturer]/model">
          <label ref="@name"/>
          <value ref="@name"/>

The itemset nodeset dynamically binds to the list selected by the first 

John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Steve Heron <steven.heron@gmail.com> 
Sent by: www-forms-request@w3.org
10/16/2005 09:17 AM


reload select when selection changes in linked select

Hi, can anyone tell me how in XForms I would link two select elements
such that when a new selection is made in the first, the contents of
the second are refreshed, eg select a car Manufacturer from list 1 and
see the corresponding car Models in list2 refreshed. What markup would
I need to establish this dependency. The selects must be populated
with value/label pairs, incidentally, a space separated list value
won't do. Thanks in advance.
Steve H
Received on Monday, 17 October 2005 15:29:34 UTC

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