HTTP Services Actions - Set Control Choices

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

HTTP Services Actions - Set Control Choices

Łukasz Pytlarz
Hi,

I set http service action for field inside repeat on value change. When I
receive response I set control choices for another field inside the same
iteration.

1. I wonder if there is any way to have current context or repeat index
inside /Choices XPath expression/ field, the field inside which I select
nodes to build dictionary.

<xf:action class="fr-itemset-action">
    <xf:var name="control-name" value="'control-teryt-select1-msc'"/>
    <xf:var name="response-items"
            value="/Response/Items[Field2 =
xxf:context('repeat-id')/../control-some-node]"/>
    <xf:var name="item-label" value="./*:Field1"/>
    <xf:var name="item-value" value="concat(./*:Field2, '|', ./*:Field1)"/>
</xf:action>

This code above may work for xf:repeat element but I have grid with attr
repeat="content".

2. Is there any place where I can filter items from this dictionary like
with normal itemset I do.

I mean something like:
"instance('fr-form-instance')//metadata//itemset[id =
context()/@itemsetid]/item[substring-before(value,'|') =
context()/../field2]"


Thanks for any help.

Łukasz

--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Reply | Threaded
Open this post in threaded view
|

Re: HTTP Services Actions - Set Control Choices

Alessandro  Vernet
Administrator
Hi Łukasz,

1. Are you saying that you have a repeated grid, that the iteration contains
a dropdown, and that when the action runs, the service returns in a single
XML document containing the *different* choices to set for each dropdown in
the repeated grid? If so, I'm afraid that this case isn't supported: you can
either set the choices for the dropdown on the "current" iteration for an
action coming from a control on that iteration, or the choices for all
dropdowns for an action coming from a control outside of the repeated grid.

2. You can filter items from the response by adding a predicate on the
`<xf:var name="response-items" value="/Response/Items[…]"/>`. Or are you
looking for something different?

‑Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
Sent from: http://discuss.orbeon.com/

--
You received this message because you are subscribed to the Google Groups "Orbeon Forms" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet