Addition of xforms:group

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

Addition of xforms:group

vernekap
Hi

In my UI, I am showing some widgets dynamically using xforms:group.
There are 3 such groups and they are mutually exclusive. What I need now is, I should be able to show collection  of all 3 xforms:group.

My question is:
Is it possible to define :
group-all = group1 + group2 + group3
(I mean can I  use xpath expression in my model?)

with regards
Pralhad
Reply | Threaded
Open this post in threaded view
|

Re: Addition of xforms:group

fl.schmitt
Hi Pralhad,

vernekap wrote
My question is:
Is it possible to define :
group-all = group1 + group2 + group3
(I mean can I  use xpath expression in my model?)
quick & dirty - you can use it using calculate - this means that you add an initially empty parent node for the aggregated groups to your model and add a binding to it:

<xforms:bind nodeset="instance('your-instance')/parent-of-aggregation" calculate="/path-to/group" />

or, if the groups have different paths:

<xforms:bind nodeset="instance('your-instance')/parent-of-aggregation" calculate="/path-to/group1 | /path-to/group2 | /path-to/group3" />

HTH
florian
Reply | Threaded
Open this post in threaded view
|

Re: Addition of xforms:group

vernekap
Hi florian

In the expression :

<xforms:bind nodeset="instance('your-instance')/parent-of-aggregation" calculate="/path-to/group1 | /path-to/group2 | /path-to/group3" />

/path-to/group1(2,3) is path in the model or path in the view (body)

with regards
Pralhad

fs(gmx) wrote
Hi Pralhad,

vernekap wrote
My question is:
Is it possible to define :
group-all = group1 + group2 + group3
(I mean can I  use xpath expression in my model?)
quick & dirty - you can use it using calculate - this means that you add an initially empty parent node for the aggregated groups to your model and add a binding to it:

<xforms:bind nodeset="instance('your-instance')/parent-of-aggregation" calculate="/path-to/group" />

or, if the groups have different paths:

<xforms:bind nodeset="instance('your-instance')/parent-of-aggregation" calculate="/path-to/group1 | /path-to/group2 | /path-to/group3" />

HTH
florian
Reply | Threaded
Open this post in threaded view
|

Re: Re: Addition of xforms:group

fl.schmitt
Hi Pralhad,

> In the expression :
>
> <xforms:bind nodeset="instance('your-instance')/parent-of-aggregation"
> calculate="/path-to/group1 | /path-to/group2 | /path-to/group3" />
>
> /path-to/group1(2,3) is path in the model or path in the view (body)

The model. The aggregation can be completely independent from the view,
it's just a "copy" of some parts of a instance that's part of the model.

florian


--
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
OW2 mailing lists service home page: http://www.ow2.org/wws