Multiple instances - setvalue problem

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Multiple instances - setvalue problem

Amagoia Madina

Hi,

On my xslt, I use 2 instances. The first one is the input instance which has data coming from the eXist database. This data is shown in the form, and afterwards, once the user has modified this data I would like to copy the data to another instance, which is the instance that I will use for doing the update on my database.

For copying the data from one instance to another, I use setvalue on the submit trigger. The problem is that on my xml instance, I have nested elements:

<a>
  <b>
     <c/>
     <d>
        <e/>
        <f>
        </f>
        <f>
        </f>
     </d>
     <d>

     </d>
     .......
  </b>
  <b>

  </b>
  .......
</a>

Thus, I have 3 levels were I can have nested elements. I have tried with xforms:repeat, but it does not work. First, I have seen that we cannot use setvalue outside a trigger; and second, I have tried inside the submit trigger, but it does not work. I would like to do somenthing like:

<xforms:group ref="instance('main-instance')/a">
<xforms:repeat id="b-repeat" nodeset="b">
<xforms:setvalue     ref="instance('request-instance')//a/b[position()=index('b-repeat')]/c" value=".[index('b-repeat')]/c" />
</xforms:repeat>
</xforms:group>

On the mailing list I have seen the possibility of using the "action while". How does this work? Someone could give me an example?

Thanks!!



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Multiple instances - setvalue problem

Alessandro  Vernet
Administrator
On 12/12/06, [hidden email] <[hidden email]> wrote:
> On the mailing list I have seen the possibility of using the "action while". How
> does this work? Someone could give me an example?

Have a look at the while.xhtml example. You can see it running if you
go to the XForms sandbox, and click on the Test Samples tab, and then
select while.xhtml from the drop-down.

Alex
--
Blog (XML, Web apps, Open Source):
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet