xforms:repeat inside an action

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

xforms:repeat inside an action

Steve Lenhart
All,

I'm trying to set some values on a button click by using xforms:repeat
inside of an action .... like below ...

<xforms:action ev:event="xforms-value-changed">
    <xforms:repeat
nodeset="instance('contract')/deals/deal/extendedData/costs/subsequentYearCosts/cost">
        <xforms:setvalue if="string-length(./amount) = 0 or (./amount eq
'')" ref="./amount" value="xs:decimal(0)"/>
    </xforms:repeat>
</xforms:action>

I seem to be getting errors .... org.orbeon.oxf.common.OXFException:
Invalid action name: {http://www.w3.org/2002/xforms}repeat ... are
repeats allowed to live inside an action??

Steve



--
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

slenhart.vcf (299 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: xforms:repeat inside an action

Hank Ratzesberger

Apparently no, <repeat> is not a valid <action>

http://www.w3.org/TR/xforms11/#action

but perhaps you can accomplish the same thing
with <setvalue> and/or <recalculate>

Also see Iteration of XForms Actions

http://www.w3.org/TR/xforms11/#action-iterated

which may be supported in the most recent
builds, or you could sponsor the feature.

Regards,
Hank

Institute for Crustal Studies
UCSB



----- Original Message -----
From: "Steve Lenhart" <[hidden email]>
To: <[hidden email]>
Sent: Thursday, December 21, 2006 10:45 AM
Subject: [ops-users] xforms:repeat inside an action


> All,
>
> I'm trying to set some values on a button click by using xforms:repeat
> inside of an action .... like below ...
>
> <xforms:action ev:event="xforms-value-changed">
>    <xforms:repeat
> nodeset="instance('contract')/deals/deal/extendedData/costs/subsequentYearCosts/cost">
>        <xforms:setvalue if="string-length(./amount) = 0 or (./amount eq
> '')" ref="./amount" value="xs:decimal(0)"/>
>    </xforms:repeat>
> </xforms:action>
>
> I seem to be getting errors .... org.orbeon.oxf.common.OXFException:
> Invalid action name: {http://www.w3.org/2002/xforms}repeat ... are
> repeats allowed to live inside an action??
>
> Steve
>
>

--------------------------------------------------------------------------------


>
> --
> 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
>



--
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: xforms:repeat inside an action

Alessandro  Vernet
Administrator
In reply to this post by Steve Lenhart
Steve,

Like Hank just mentioned, you cannot use <xforms:repeat> in actions.
It looks like what you have a here is a nice case where you can use
the "while" attribute on <xforms:action>. See the stand-alone example
while.xhtml (from the XForms sandbox, go to the last tab and select
while.xhtml in the drop-down).

Alex

On 12/21/06, Steve Lenhart <[hidden email]> wrote:

> All,
>
> I'm trying to set some values on a button click by using xforms:repeat
> inside of an action .... like below ...
>
> <xforms:action ev:event="xforms-value-changed">
>     <xforms:repeat
> nodeset="instance('contract')/deals/deal/extendedData/costs/subsequentYearCosts/cost">
>         <xforms:setvalue if="string-length(./amount) = 0 or (./amount eq
> '')" ref="./amount" value="xs:decimal(0)"/>
>     </xforms:repeat>
> </xforms:action>
>
> I seem to be getting errors .... org.orbeon.oxf.common.OXFException:
> Invalid action name: {http://www.w3.org/2002/xforms}repeat ... are
> repeats allowed to live inside an action??
>
> Steve
>
>
>
>
> --
> 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
>
>
>
>

--
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