how recover the label name of dropdown in orbeon

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

how recover the label name of dropdown in orbeon

Firas Kammoun
I have a dropdown list and i want to recover the label name in a text field but it show me the value of the dropdown.

Thank you !

--
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: how recover the label name of dropdown in orbeon

Firas Kammoun
I tried to follow the steps in this link :
http://qaoverflow.com/question/in-orbeon-xform-how-to-get-selected-drop-down-label-on-change-of-drop-down-in-a-input-field/
but it didn't work

--
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: how recover the label name of dropdown in orbeon

Alessandro  Vernet
Administrator
Hi Firas,

Using xxf:itemset() is indeed the way to go. You can find more about it on:

http://doc.orbeon.com/xforms/xpath/extension-controls.html#xxfitemset

If this doesn't help, can you tell us exactly what is the XPath expression you used and that doesn't work for you?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: how recover the label name of dropdown in orbeon

Firas Kammoun
It's work for me just the first label , i tried selected='true' but it not work for me 



Le vendredi 12 août 2016 21:13:09 UTC+1, Alessandro Vernet a écrit :
Hi Firas,

Using xxf:itemset() is indeed the way to go. You can find more about it on:

<a href="http://doc.orbeon.com/xforms/xpath/extension-controls.html#xxfitemset" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fxpath%2Fextension-controls.html%23xxfitemset\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQVUtqMsrp-6EB_kR8xB5esxYRlQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdoc.orbeon.com%2Fxforms%2Fxpath%2Fextension-controls.html%23xxfitemset\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNHQVUtqMsrp-6EB_kR8xB5esxYRlQ&#39;;return true;">http://doc.orbeon.com/xforms/xpath/extension-controls.html#xxfitemset

If this doesn't help, can you tell us exactly what is the XPath expression
you used and that doesn't work for you?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/how-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661705.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2Fhow-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661705.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNExqLCIN41wPLMrLQbxJ54S1nfDkw&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2Fhow-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661705.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNExqLCIN41wPLMrLQbxJ54S1nfDkw&#39;;return true;">http://discuss.orbeon.com/how-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661705.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.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: how recover the label name of dropdown in orbeon

Firas Kammoun
In reply to this post by Alessandro Vernet

It's work for me just the first label , i tried selected='true' but it not work for me

 

--
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: how recover the label name of dropdown in orbeon

Alessandro  Vernet
Administrator
Hi Firas,

The XPath expression isn't using xxf:itemset(), which would explain why it isn't working. But I thought you were telling is that using xxf:itemset() didn't work for you; did I misunderstand your message?

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
Reply | Threaded
Open this post in threaded view
|

Re: how recover the label name of dropdown in orbeon

Firas Kammoun
Hi Alessandro


in fact I want to display the label of the current dropdown. before it shows me the value but after writing " $ form -resources / control- 2 / item / label " on the setting- control > Calculated value , it just shows me the first label. So I want to know the instruction to display the current label .

Le lundi 15 août 2016 18:21:08 UTC+1, Alessandro Vernet a écrit :
Hi Firas,

The XPath expression isn't using xxf:itemset(), which would explain why it
isn't working. But I thought you were telling is that using xxf:itemset()
didn't work for you; did I misunderstand your message?

Alex

-----
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet
--
View this message in context: <a href="http://discuss.orbeon.com/how-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661714.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2Fhow-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661714.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFuX_Q_02YvKpgRXBleTBAyB7WtfQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fdiscuss.orbeon.com%2Fhow-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661714.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFuX_Q_02YvKpgRXBleTBAyB7WtfQ&#39;;return true;">http://discuss.orbeon.com/how-recover-the-label-name-of-dropdown-in-orbeon-tp4661703p4661714.html
Sent from the Orbeon Forms community mailing list mailing list archive at Nabble.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: how recover the label name of dropdown in orbeon

Alessandro  Vernet
Administrator
Hi Firas,

Assuming the name of your dropdown control, as set in Form Builder, is my-dropdown, then you can get the label for the currently selected value with:

xxf:itemset('my-dropdown-control', 'xml', true())/itemset/choices/item[@selected = 'true']/label

You'll let us know if this helps,

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet