Re: position attribute in xforms:insert

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/position-attribute-in-xforms-insert-tp1583571p1584918.html

Alexandru,

This doesn't work because the value of "position" is supposed to be
either "before" or "after"; it can't be an XPath expression that
returns that value. In some places, Orbeon Forms supports AVTs for
this, as an extension to XForms spec, so you can write
position="{$insertWhere}", but this is not one of those places. I
created an RFE for this:

http://forge.ow2.org/tracker/index.php?func=detail&aid=314804&group_id=168&atid=350207

Alex

On Sun, Mar 7, 2010 at 6:20 AM, Alexandru Ionita
<[hidden email]> wrote:

>
>
>
> Hello,
> I want to set for the position attribute of the xforms:insert expression a
> value which is variable. What I'm trying to do is as here:
>
> <xf:repeat nodeset="InvoiceItems/item" id="item-repeat">
> <xxforms:variable name="position" select="position()"/>
> <xxforms:variable name="insertWhere"
> select="if($position=count(instance('content')/InvoiceItems/item))then
> 'after' else 'before'"/>
> <xf:insert ev:event="DOMActivate"
> context="instance('content')/InvoiceItems" nodeset="item"
> at="index('item-repeat')"
> position="$insertWhere" origin="instance('invoice-item-template')" />
> </xf:repeat>
>
> the problem is that my variable is not recognized in this statement and
> Orbeon is asking only for the static values "after" or "before".
> If I'm displaying the value of that variable everything works great.
> <xf:output value="$insertWhere"/>
>
> Thanks.
> Alexandru
>
> --
> 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
>
>


--
Orbeon Forms - Web forms, open-source, for the Enterprise -
http://www.orbeon.com/
My Twitter: http://twitter.com/avernet


--
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
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet