All, I have tried to post the question through the web, but
obviously it was lost. I have found an anomaly of xforms:itemset when its attribute
nodeset is bound to the query result to database, such as MS SQL Server. Once the populated drop down list, the first entry would be
overwritten by the content of any entry other than the first once clicked, meaning
that there would be two entries with the same content – the first entry
always shows the content of the most recently clicked one. For instance, initially the drop down list appears in the order:
R1001, R1002, R1003 and R1004. Once I clicked the last (4th) entry,
whose content is R1004, the whole entries would be changed to R1004, R1002, R1003
and R1004. By the same token, if the 2nd entry, R1002, is clicked,
the whole entries would be changed to R1002, R1002, R1003 and R1004. By contrast, if the drop down list was populated by hardcoding
the label-value pairs through xforms:item, rather than xforms:itemset on the
fly, things would just go smoothly. Has any one experienced such anomaly of xforms:itemset
element? Any clue will be highly appreciated. FYI, I am using OPS 3.0.1 under Windows XP 2002 sp 2, and please
see the xsl code that instantiates the XForms controls, and db query result
that feeds to nodeset at the bottom. Regards, Spenser **** Start of xsl code **** <xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xforms="http://www.w3.org/2002/xforms"
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"
xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml"
xmlns:f="http://orbeon.org/oxf/xml/formatting"
xmlns:xsi="http://www.w3.org/2001/XML:Schema-instance"> <xsl:template match="/">
<xhtml:html>
<xhtml:head>
<xhtml:title>SQL Server Query - for Application ID</xhtml:title>
<xforms:model>
<xforms:instance
id="app-ids-instance">
<xsl:copy-of
select="/Application_IDs"/>
</xforms:instance>
</xforms:model>
</xhtml:head>
<xhtml:body>
<xhtml:table>
<xhtml:tr>
<xhtml:td>
<xforms:input ref="name" xhtml:size="30"/>
</xhtml:td>
</xhtml:tr>
<xhtml:tr>
<xhtml:th>Application ID Selection</xhtml:th>
<xhtml:td style="padding: 1em"
colspan="5">
<xforms:select1 appearance="minimal" selection="open"
incremental="true" ref="Application_ID">
<xforms:itemset nodeset="instance('app-ids-instance')/Application_ID">
<xforms:label ref="."/>
<xforms:value ref="."/>
</xforms:itemset>
</xforms:select1>
</xhtml:td>
</xhtml:tr>
</xhtml:table>
</xhtml:body>
</xhtml:html> </xsl:template> </xsl:stylesheet> **** End of xsl code **** **** Start of db query result **** <Application_IDs> <Application_ID>R1001</Application_ID> <Application_ID>R1002</Application_ID> <Application_ID>R1003</Application_ID> <Application_ID>R1004</Application_ID> </Application_IDs> **** End of db query result **** -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
Spenser,
I am not sure I understand everything. Is it possible for you to package a simple example illustrating the issue, that can be run in the XForms Sandbox? -Erik > I have tried to post the question through the web, but obviously it was > lost. > > > > I have found an anomaly of xforms:itemset when its attribute nodeset is > bound to the query result to database, such as MS SQL Server. > > > > Once the populated drop down list, the first entry would be overwritten > by the content of any entry other than the first once clicked, meaning > that there would be two entries with the same content $(H t(Bhe first entry > always shows the content of the most recently clicked one. > > > > For instance, initially the drop down list appears in the order: R1001, > R1002, R1003 and R1004. Once I clicked the last (4^th ) entry, whose > content is R1004, the whole entries would be changed to R1004, R1002, > R1003 and R1004. By the same token, if the 2^nd entry, R1002, is > clicked, the whole entries would be changed to R1002, R1002, R1003 and > R1004. > > > > By contrast, if the drop down list was populated by hardcoding the > label-value pairs through xforms:item, rather than xforms:itemset on the > fly, things would just go smoothly. > > > > Has any one experienced such anomaly of xforms:itemset element? Any clue > will be highly appreciated. > > > > FYI, I am using OPS 3.0.1 under Windows XP 2002 sp 2, and please see the > xsl code that instantiates the XForms controls, and db query result that > feeds to nodeset at the bottom. > > > > Regards, > > > > Spenser > > > > **** Start of xsl code **** > > <xsl:stylesheet version="2.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > xmlns:xforms="http://www.w3.org/2002/xforms" > > xmlns:xxforms="http://orbeon.org/oxf/xml/xforms" > > xmlns:xhtml="http://www.w3.org/1999/xhtml" > > xmlns="http://www.w3.org/1999/xhtml" > > xmlns:f="http://orbeon.org/oxf/xml/formatting" > > xmlns:xsi="http://www.w3.org/2001/XML:Schema-instance"> > > > > <xsl:template match="/"> > > <xhtml:html> > > <xhtml:head> > > <xhtml:title>SQL Server Query - for Application > ID</xhtml:title> > > <xforms:model> > > <xforms:instance > id="app-ids-instance"> > > <xsl:copy-of > select="/Application_IDs"/> > > </xforms:instance> > > </xforms:model> > > </xhtml:head> > > <xhtml:body> > > <xhtml:table> > > <xhtml:tr> > > <xhtml:td> > > <xforms:input ref="name" xhtml:size="30"/> > > </xhtml:td> > > </xhtml:tr> > > <xhtml:tr> > > <xhtml:th>Application ID Selection</xhtml:th> > > <xhtml:td style="padding: 1em" > colspan="5"> > > <xforms:select1 appearance="minimal" > selection="open" incremental="true" ref="Application_ID"> > > > > <xforms:itemset > nodeset="instance('app-ids-instance')/Application_ID"> > > <xforms:label ref="."/> > > <xforms:value > ref="."/> > > > </xforms:itemset> > > </xforms:select1> > > </xhtml:td> > > </xhtml:tr> > > </xhtml:table> > > </xhtml:body> > > </xhtml:html> > > </xsl:template> > > </xsl:stylesheet> > > **** End of xsl code **** > > > > **** Start of db query result **** > > <Application_IDs> > > <Application_ID>R1001</Application_ID> > > <Application_ID>R1002</Application_ID> > > <Application_ID>R1003</Application_ID> > > <Application_ID>R1004</Application_ID> > > </Application_IDs> > > **** End of db query result **** -- Orbeon - XForms Everywhere: http://www.orbeon.com/blog/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |