bug with select1 and items

4 views
Skip to first unread message

aaron

unread,
Jan 29, 2008, 1:43:05 PM1/29/08
to sidewinder-users
If I have a XForm with a select1 that contains items with labels and
values that have relative xpath expressions, the select1 doesn't work
correctly. Looks like the labels and values aren't picking up their
context node correctly (should be the node bound of the select1, I
believe).

Here is the form:

<?xml version="1.0" encoding="UTF-8"?>
<!-- basic FO page definition stuff -->
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xforms="http://
www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<head>
<title>select1 testcase</title>

<xforms:model id="mymodel">
<xforms:instance xmlns="">
<values>
<value>1</value>
<value>2</value>
<value>3</value>
<value>4</value>
<value>5</value>
<selectedValue>3</selectedValue>
</values>
</xforms:instance>

<xforms:bind id="mybind"
nodeset="value"
type="xsd:double"/>

</xforms:model>
</head>
<body>
<h2>This testcase should show three select1's that look exactly
the same.
When a value from one is selected, the other's selected
value should
change to be the same value.
</h2>
<h3>This testcase exercises the select1 element with itemset and
items
</h3>


<xforms:select1 id="myinput" ref="selectedValue">
<xforms:label>instance node value: </xforms:label>
<xforms:itemset nodeset="../value">
<xforms:label ref="."/>
<xforms:value ref="."/>
</xforms:itemset>
</xforms:select1>

<xforms:select1 id="myinput" ref="selectedValue">
<xforms:label>instance node value: </xforms:label>
<xforms:itemset nodeset="/values/value">
<xforms:label ref="."/>
<xforms:value ref="."/>
</xforms:itemset>
</xforms:select1>

<xforms:select1 id="myinput2" ref="selectedValue">
<xforms:label>instance node value: </xforms:label>
<xforms:item>
<xforms:label ref="../value[1]"/>
<xforms:value ref="../value[1]"/>
</xforms:item>
<xforms:item>
<xforms:label ref="../value[2]"/>
<xforms:value ref="../value[2]"/>
</xforms:item>
<xforms:item>
<xforms:label ref="../value[3]"/>
<xforms:value ref="../value[3]"/>
</xforms:item>
<xforms:item>
<xforms:label ref="../value[4]"/>
<xforms:value ref="../value[4]"/>
</xforms:item>
<xforms:item>
<xforms:label ref="../value[5]"/>
<xforms:value ref="../value[5]"/>
</xforms:item>
</xforms:select1>
</body>
</html>

--Aaron

Phil Booth

unread,
Jan 30, 2008, 1:10:55 PM1/30/08
to sidewind...@googlegroups.com
Hi Aaron,

Thanks for reporting this, I can confirm it is a bug in formsPlayer
and that we'll have it fixed in a forthcoming release.

Phil.

Reply all
Reply to author
Forward
0 new messages