Login  Register

Re: Select1 binding to instance in Form builder

Posted by Hank Ratzesberger-2 on Mar 03, 2011; 8:22pm
URL: https://discuss.orbeon.com/Select1-binding-to-instance-in-Form-builder-tp3333206p3334128.html

Hi Hasan,

You can use the src attribute to have the instance loaded :

<xforms:instance id="stations"
  src="http://db.nees.ucsb.edu/exist/rest/db?_query=doc('/pub/stations.xml')"/>

The select control has an itemset with a nodeset attribute.  Sorry that the
xpath and all looks complicated. Note that you can have both items and itemsets,
so you can have a "slect one" etc. :


<xforms:select1 ref="sta" id="sta-select">
 <xforms:item>
    <xforms:value/>
    <xforms:label> Select Station ... </xforms:label>
  </xforms:item>
  <xforms:itemset nodeset="instance('stations')//pfarr[@name='Sta_Info']/pfarr">
    <xforms:value value="upper-case(@name)"/>
    <xforms:label><xforms:output value="concat(upper-case(@name),' - ',pfstring[@name='Description'])"/></xforms:label>
  </xforms:itemset>
</xforms:select1>


<xforms:itemset nodeset="instance('stations')//pfarr[@name='Sta_Info']/pfarr">
  <xforms:value value="upper-case(@name)"/>
  <xforms:label><xforms:output value="concat(upper-case(@name),' - ',pfstring[@name='Description'])"/></xforms:label>
</xforms:itemset>


HTH,
Hank

On Mar 3, 2011, at 4:03 AM, Hasan wrote:

> Alex,
>
> I am currently using Form Builder in Orbeon 3.7.1 dev version . I need to
> bind my select1 components to a url for drop down values.
>
> Does Form Builder provides the functionality to get the item values from
> some URL/source.
>
>
> Regards,
>
> Hasan
>
> -----
> Hasan
> --
> View this message in context: http://orbeon-forms-ops-users.24843.n4.nabble.com/Select1-binding-to-instance-in-Form-builder-tp3333206p3333206.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
Hank Ratzesberger
NEES@UCSB
Earth Research Institute
6707 Ellison Hall
University of California, Santa Barbara
805-893-8042









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