using select1 with repeat

Hi ,

How to use 'select1' control with the 'repeat'  tag?
The values from the XForms instance data for the select1 field is not
getting populated when the page is executed, but the same is working
without repeat tag(i,e for single record in xml file ) and also for select
with repeat tag.

The xforms file looks like :

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xforms="http://www.w3.org/2002/xforms/cr"
xmlns:xformsext="urn:xformsExtensions"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events"
xmlns:tm="http://www.topicmaps.org/xtm/1.0/"
xmlns:xlink="http://www.w3.org/1999/xlink">
      <head>
            <xforms:model>
                  <xforms:instance
xlink:href="testForm.xml"></xforms:instance>
                  <xforms:bind nodeset="test" required="true" type="test"
/>
            </xforms:model>
      </head>

      <body>

      <xforms:repeat id="repid" nodeset="test" startIndex="1" number="10">

            <xforms:input ref="@name">
                  <label>name</label>
            </xforms:input>
            <xforms:select1 ref="operation" id="repid">
                  <label>OperationType</label>
                  <xforms:choices >
                        <xforms:item >
                              <label>sum</label>
                              <value>sum</value>
                        </xforms:item>
                        <xforms:item>
                              <label>count</label>
                              <value>count</value>
                        </xforms:item>
                        <xforms:item>
                              <label>MAX</label>
                              <value>MAX</value>
                        </xforms:item>
                        <xforms:item>
                              <label>MIN</label>
                              <value>MIN</value>
                        </xforms:item>
                  </xforms:choices>
            </xforms:select1>
            <xforms:input ref="@id">
                  <label>id</label>
            </xforms:input>
      </xforms:repeat>
      </body>
</xhtml:html>

Intance data is :

<testElement>
<test name="String" id="11111" >
      <operation>count</operation>
</test>
<test name="int" id="222222" >
      <operation>sum</operation>
</test>
</testElement>

In the output, only 'operation' field of the last 'test' element ( i.e the
value = 'sum' ) is getting selected, and it seems like all the select1
fields in the page are in a group, letting only the last value for the
'operation' getting selected in the page. Is there any problem with the
code/ any other attribute to be added to the select1 tag?

thanks,

Amitha.

Received on Monday, 4 August 2003 05:33:26 UTC