Hi everybody
I try to construct ListBox from my variable xml
but i have problems
how to get value of for-each to construct my listbox ?
is "select="$var_groupList/groups/group/name/text()" correct ?
<c:create destination=".">
<e:for-each select="$var_groupList/groups/group/name/text()">
<b:ListBoxOption>???</b:ListBoxOption>
</e:for-each>
<e:for-each select="$var_groupList/groups/group/name/text()">
<b:ListBoxOption>???</b:ListBoxOption>
</e:for-each>
My variable :
<groups>
<group id="0">
<id>0</id>
<name>Administrateurs</name>
<libelle>lib Indicateurs WEB</libelle>
<isactive>true</isactive>
</group>
<group id="1">
<id>1</id>
<name>Indicateurs WEB</name>
<libelle>lib Indicateurs Force</libelle>
<isactive>false</isactive>
</group>
<group id="0">
<id>0</id>
<name>Administrateurs</name>
<libelle>lib Indicateurs WEB</libelle>
<isactive>true</isactive>
</group>
<group id="1">
<id>1</id>
<name>Indicateurs WEB</name>
<libelle>lib Indicateurs Force</libelle>
<isactive>false</isactive>
</group>
Best regard,
Arnaud

Create listboxOption with create and for-each
16 April, 2008 - 12:24 — yudiHi Arnaud,
Here is the example to create list box option with create and for-each loop.The create command should be inside the for-each loop.
<e:data type="text/xml">
<listBox> <listBoxOption>one</listBoxOption> <listBoxOption>two</listBoxOption> </listBox>
</e:data>
</e:variable>
<button> add list box option
<e:handler event="click">
<e:for-each select="[($iterator/listBox/listBoxOption)]">
<e:variable name="listBoxOption" select="string(.)" />
<c:create destination="javascript:bb.document.getElementById('listBox')" mode="appendChild">
<b:listBoxOption><c:value-of select="$listBoxOption" /></b:listBoxOption>
</c:create>
</e:for-each>
</e:handler>
</button>
<b:listBox id="listBox">
</b:listBox>
Cheers,
Yudi