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: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
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:     <[EMAIL PROTECTED]>
> For additional commands, e-mail:   <[EMAIL PROTECTED]>
>



---------------------------------------------------------------------
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:     <[EMAIL PROTECTED]>
For additional commands, e-mail:   <[EMAIL PROTECTED]>

Reply via email to