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

How do I make a select1 control visible based on selection of values in another select1 control - fairseas

From: Anjali Abraham <anjalia@aztec.soft.net>
Date: Mon, 13 Jun 2005 11:39:25 +0530
Message-ID: <584DE893B0E08F4B9748E295029F1E97F00B6B@maya.aztec.soft.net>
To: www-forms@w3.org, www-forms-request@w3.org
Hi All,
            I have a scenario where there are 2 input xml's, as described
1st XML:
   -<elements id="1">
         <element1 attr1="aaa">0.02</ element1> 
         <element2 attr2="2">XXX_XX</ element2> 
            <element3>false</ element3> 
   -<elements id="4">
<element1 attr1="aaa">0.000</ element1> 
<element2 attr2="1">YYY_YY</ element2> 
<element3>1</ element3> 
2nd XML:
<rate id="1" name="STATE" >
<rate id="2" name="LUXURY">
Now I have in my UI one select1 control which will display element2's texts
like XXX_XX and YYY_YY from XML1 and below to this control I have another
select1 control which displays the element "rate"-attribute "name" values
like STATE and LUXURY from XML2 but this select1 control need to be visible
only when I choose XXX_XX and if I choose YYY_YY from 1st select1 control,
my 2nd select1 control shouldn't get visible.
Now for the same I have implemented it as :
In the Model, the bind is written as:
            <xforms:bind nodeset="root/elements/emenet2" type="xsd:string"
            <xform:bind nodeset="Rates/rate" relevant="
root/elements/emenet2="YYY_YY" required="true()"/>
And in the Display, I have given the display as:
            <xforms:select1 ref=" root/elements/emenet2/\@attr2"
                        <xforms:itemset model="QQQ" nodeset="Rates/rate ">
                                    <xforms:label ref="\@name"
style="width:100px;" />
                                    <xforms:value ref="\@id" />
But still for any selection to the 1st select1 control, the 2nd select1
control is always visible........ :-(
What else is the condition I need to add to make it invisible and is that
the bind condition and the display condition is right... since I am pretty
new to Xforms, so please anybody can help me out in this scenario.
Received on Monday, 13 June 2005 06:08:23 UTC

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