cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Josema Alonso" <alo...@aafunky.com>
Subject Re: XMLForm: dynamic content listbox
Date Wed, 20 Nov 2002 18:50:13 GMT
Hello.

I had a very similar problem a few days ago. The way to go is the itemset
tag as used in the wizard demo. Take a look at the 'userIdentity.xml' file
where the Hobbies get listed:
<xf:selectMany ref="/hobby" selectUIType="checkbox">
<xf:caption>Hobbies</xf:caption>
    <xf:itemset nodeset="allHobbies">
        <xf:caption ref="value"/>
        <xf:value ref="key"/>
    </xf:itemset>
</xf:selectMany>

All you have to do is to change the UIType to the one desired and fill the
items with values taken from the DB, for example from the action.

Hope it helps,
Josema.


----- Original Message -----
From: <Sylvain.Thevoz@swisscom.com>
To: <cocoon-users@xml.apache.org>
Sent: Wednesday, November 20, 2002 3:56 PM
Subject: XMLForm: dynamic content listbox


> Hello,
>
> I'm using listbox in XMLForm (with tag <xf:selectOne
selectUIType="listbox">). The content of the listbox (the items listed) is
hard-coded in the xml document (view) like that:
>
> <xf:selectOne selectUIType="listbox">
>  <xf:item id="unix">
>   <xf:caption>Unix</xf:caption>
>   <xf:value>Unix></xf:value>
>  </xf:item>
>  <xf:item id="windows">
>   <xf:caption>Windows</xf:caption>
>   <xf:value>Windows</xf:value>
>  </xf:item>
> </xf:selectOne>
>
> Is there a possibility to retrieve dynamically these items from a database
instead of using the hard-coded items in xml document??
>
> Thank you
> Sylvain
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
> For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>
>



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message