select1 item label and value

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

select1 item label and value

klemm
 
We want to capture the selected item value AND label in our xml model, is there a pattern for doing this with xforms/orbeon?
 
Thanks,
Daniel


--
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
Reply | Threaded
Open this post in threaded view
|

Re: select1 item label and value

SportsQs
<BUMP>
I have the same problem. Does anybody know how to accomplish this.
TIA
Reply | Threaded
Open this post in threaded view
|

Re: select1 item label and value

bsteuhl
In reply to this post by klemm
You can store your values in xml instance and then use itemset in your selet1 control.  Then store the value in the control reference and use xpath following-sibling or preceding-sibling function depending on your xml instance structure for itemset to capture the label in another xml element in your model.

Brian Steuhl
BTMSoftwareSolutions.com
Reply | Threaded
Open this post in threaded view
|

Re: select1 item label and value

bsteuhl
Forgot to mention that you would capture the label on xforms:action xforms-value-changed event
Reply | Threaded
Open this post in threaded view
|

Re: Re: select1 item label and value

fl.schmitt(ops-users)
In reply to this post by SportsQs
Hi,

> I have the same problem. Does anybody know how to accomplish this.

I've posted a short example on StackOverflow:

http://stackoverflow.com/questions/6814240/how-do-i-populate-and-xforms-model-with-the-value-and-text-of-a-select1

HTH
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
Reply | Threaded
Open this post in threaded view
|

Re: Re: Re: select1 item label and value

Erik Bruchez
Administrator
I think the reply to the SO question is fine.

In addition, the xforms-select event in Orbeon Forms has context
information which allows you to retrieve the value selected:

  event('xxforms:item-value')

The same doesn't exist for the item label, so you still have to do a
value -> label lookup.

-Erik

On Mon, Jul 25, 2011 at 7:07 AM, Florian Schmitt
<[hidden email]> wrote:

> Hi,
>
>> I have the same problem. Does anybody know how to accomplish this.
>
> I've posted a short example on StackOverflow:
>
> http://stackoverflow.com/questions/6814240/how-do-i-populate-and-xforms-model-with-the-value-and-text-of-a-select1
>
> HTH
> 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
>
>


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