Re: [flexcoders] Populating a Repeater from a ComboBox

2006-03-14 Thread Manish Jethani
On 3/13/06, nahruka [EMAIL PROTECTED] wrote:

 I'm trying to populate a Repeater with an XMLListCollection depending on the 
 selected index in a ComboBox. Although cmbAny.selectedIndex changes as I 
 select different values from the ComboBox, the DataProvider remains the same, 
 as if cmbAny.selectedIndex = 0.

   mx:Repeater id=rep
   dataProvider={new 
 XMLListCollection(lclasseXML.any_academic[cmbAny.selectedIndex].assignatura)}
  
[snip]

That should work: the combo box should fire a change event, which
should then trigger data binding.  Anyway - I don't have time to dig
into this.  Your other option is to listen for the change event on
the combo box and reset the repeater's data provider in the handler.

Manish


--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

* To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/

* To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

* Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
 





[flexcoders] Populating a Repeater from a ComboBox

2006-03-13 Thread nahruka



Hi all,I'm trying to populate a Repeater with an XMLListCollection depending on the selected index in a ComboBox. Although cmbAny.selectedIndex changes as I select different values from the ComboBox, the DataProvider remains the same, as if cmbAny.selectedIndex = 0. Any suggestions? Thanks! mx:Accordion id="acc" width="100%" height="100%" selectedIndex="0"  marginBottom="2" marginLeft="2" marginRight="2" marginTop="2" mx:Repeater id="rep"   dataProvider="{new XMLListCollection(lclasseXML.any_academic[cmbAny.selectedIndex].assignatura)}"  mx:VBox id="assig" label="{rep.currentItem.nom}" width="100%"  mx:TileList id="llista" dataProvider="{new XMLListCollection(rep.currentItem.grup)}" listItemRenderer="Components.Grup"marginLeft="8" marginRight="8" marginBottom="8" marginTop="8"   height="200" width="100%"   change="llistaChange(event)" /mx:TileList /mx:VBox /mx:Repeater/mx:AccordionWhere the ComboBox is declared as follows. At initialization, cmbAny.selectedIndex is set to 0 in order to point to the first node any_academic (otherwise -1).mx:ComboBox id="cmbAny" dataProvider="{new XMLListCollection([EMAIL PROTECTED])}" initialize="{cmbAny.selectedIndex=0}"  change="cmbAnyChange(event)"/mx:ComboBoxAnd lclasseXML:mx:XML id="lclasseXML"  source="assets/xml/lclasse.xml" format="e4x" xmlns=""/mx:XML






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.