Re: set value for more than one element in select1?

Andrew S. Townley wrote:
> Hi Erik,
> 
> That looks the business.  I'll do some playing around and see what
> happens.  Looks like the idea is a workable solution though.  When I get
> a chance, there's clearly a lot more I need to learn about XForms--I
> wouldn't have thought of the intermediate instance.
> 
> One thing in looking at it that I don't understand, however, is that
> even though it isn't in what you included, you're still basing the list
> contents off of the 'items' instance using an itemset, right?  If this
> is true, isn't this going to cause problems in OPS?  I know this is
> getting into ops-specific territory, but won't the behavior I observed
> the other day with losing attribute values from copy bite me here as
> well?  If not, I'll do some more reading so that I really understand
> what's happening in your fragment.  I haven't really done much with
> insert/setvalue yet.

I think your issue was with xforms:copy, but here you would be using:

<xforms:itemset nodeset="instance('items')/Items">
   <xforms:label ref="."/>
   <xforms:value ref="@Code"/>
</xforms:itemset>

i.e. not using xforms:copy, so you shouldn't have any problem!

-Erik

-- 
Orbeon - XForms Everywhere:
http://www.orbeon.com/blog/

Received on Monday, 24 July 2006 15:13:53 UTC