Form Builder: How do I access the currently selected item in a single list box?

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

Form Builder: How do I access the currently selected item in a single list box?

SparkyII
Hi, folks.

I was wondering how to access the currently selected value of an item in a single list box (slbPatients) so that I can copy the value to a single line text(txtTest). I've tried:

<xforms:action ev:event="xforms-select" ev:observer="slbPatients-control" >
        <xforms:setvalue ref="//form/select/txtTest" value="//form/select/slbPatients/item"/>
</xforms:action>

But without any success. If I use another single line text in the value field, there isn't a problem - I'm just unsure about how to form the correct xpath statement to access the values stored in the single list box.

Many thanks,

Sparks
Reply | Threaded
Open this post in threaded view
|

Re: Form Builder: How do I access the currently selected item in a single list box?

SparkyII
Have I asked a silly question? Is there a better place to look for an answer?

Many thanks,

Sparks
Reply | Threaded
Open this post in threaded view
|

Re: Form Builder: How do I access the currently selected item in a single list box?

SparkyII
Ah! Found it in the documentation eventually:

On xforms-select, the following extension attributes are supported:

    *

      event('xxforms:item-value')

      When this event is dispatched to in response to a selection control item being selected, returns the value of the selected item.
Reply | Threaded
Open this post in threaded view
|

Re: Re: Form Builder: How do I access the currently selected item in a single list box?

Erik Bruchez
Administrator
Glad you figured it out ;)

-Erik

On Wed, Feb 2, 2011 at 9:40 AM, SparkyII <[hidden email]> wrote:

Ah! Found it in the documentation eventually:

On xforms-select, the following extension attributes are supported:

   *

     event('xxforms:item-value')

     When this event is dispatched to in response to a selection control
item being selected, returns the value of the selected item.

--
View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Form-Builder-How-do-I-access-the-currently-selected-item-in-a-single-list-box-tp3251401p3255098.html
Sent from the Orbeon Forms (ops-users) mailing list archive at Nabble.com.


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