- From: Christian Lebe <christianlebe@gmail.com>
- Date: Wed, 8 Nov 2006 18:16:07 +0800
- To: www-forms@w3.org
- Message-ID: <61929f260611080216o1900b2c7jabc83086c1369d44@mail.gmail.com>
Hiya all,
I'm a noob at xforms so any help on this will be very much appreciated.
Basically, I have two dropdown list that are dependants to the option
selected on the first one.
Here's the instance and the submisssion in head
<head>
<xf:instance id="form" src="form.cgi?action=getReportAccess" />
<xf:instance id="values" src="admin.cgi?action=getPermissionAccess"
/>
<xf:submission id="getValue" instance="values"
ref="instance('form')/access[index('accessRepeat')]"
action="admin.cgi?action=getPermissionAccess"
method="post" replace="instance" />
</head>
and in body.. the two dropdown list are:
<xf:repeat nodeset="instance('form')/access" id="accessRepeat">
<tr>
<td><label>Allowed Access By</label></td>
<td>
<!-- This is the first dropdown box where i have 3 options, the second
dropdwon will be populated based on the option chosen on this -->
<xf:select1 ref="type">
<xf:label/>
<xf:item>
<xf:label>Department</xf:label>
<xf:value>1</xf:value>
</xf:item>
<xf:item>
<xf:label>Team</xf:label>
<xf:value>2</xf:value>
</xf:item>
<xf:item>
<xf:label>Position</xf:label>
<xf:value>3</xf:value>
</xf:item>
<xf:send ev:event="xforms-value-changed" submission="getValue"
at="index('accessRepeat')">
</xf:send>
</xf:select1>
</td>
</tr>
<tr>
<td><label>Value</label></td>
<td>
<xf:select1 ref="value">
<xf:label />
<xf:itemset nodeset="instance('values')/value">
<xf:label ref="@name" />
<xf:value ref="@id" />
</xf:itemset>
</xf:select1>
</td>
</tr>
</xf:repeat>
Basically, I've got it working for one instance, but once I load the values
from DB and actually use the repeat, it fails to reload the second dropdown
box. I think it must be confuse to load which instance. I'm not sure how to
get it working. Any comment/help will be very appreciated.
Thanks heaps!
Christian
Received on Wednesday, 8 November 2006 15:46:47 UTC