[flexcoders] Re: Reoading a view from a viewstack

2009-04-20 Thread gedavies
I have a series of tabs and I use the show event in the individual 
components.  Then I keep a needsReloading boolean value that is based upon 
event data from a controller.  If the tab is selected, the show event kicks in 
and the data is reloaded based upon the needsReloading boolean.  

Not sure if that is what you are looking for but I hope it helps.

Geoff.

--- In flexcoders@yahoogroups.com, Wally Kolcz wko...@... wrote:

 My application uses a ToggleButtonBar with a viewstack as it's dataprovider. 
 When the app is first loaded and each component is called in the stack, it 
 loads the component and runs it's initApp() on the creationComplete. However 
 when you go back it's already loaded and doesn't run the initApp() and pull 
 new external data. 
 
 Is there a way to automatically reload the component each time a generated 
 button is pushed in the ToggleButtonBar?





[flexcoders] Re: Reoading a view from a viewstack

2009-04-20 Thread zyzzx00_99
geoff is dead on.  There are a probably 100 ways to do what you want done.  
states/transitions, event listeners, adding and removing the children via 
actionscript and leaving in your initApp().

But, yeah, the least amnt of code (depending on the framework you're using) 
would probably be adding this to your mxml:  show=initApp()





--- In flexcoders@yahoogroups.com, gedavies gedav...@... wrote:

 I have a series of tabs and I use the show event in the individual 
 components.  Then I keep a needsReloading boolean value that is based upon 
 event data from a controller.  If the tab is selected, the show event kicks 
 in and the data is reloaded based upon the needsReloading boolean.  
 
 Not sure if that is what you are looking for but I hope it helps.
 
 Geoff.
 
 --- In flexcoders@yahoogroups.com, Wally Kolcz wkolcz@ wrote:
 
  My application uses a ToggleButtonBar with a viewstack as it's 
  dataprovider. When the app is first loaded and each component is called in 
  the stack, it loads the component and runs it's initApp() on the 
  creationComplete. However when you go back it's already loaded and doesn't 
  run the initApp() and pull new external data. 
  
  Is there a way to automatically reload the component each time a generated 
  button is pushed in the ToggleButtonBar?