I've done that using the "show" event of each view in the stack.
You can try using the "show" event for identificacao and pais components,
but in case that doesn't work, try using the event from the outer component
("<mx:Box"), like this:
private function reloadident():void {
ident.reload()
}
private function reloadpais():void {
pa.reload();
}
and both, the identificacao and pais components, have:
public function reload():void {
//reload necesary data
}
<mx:ViewStack id="viewstack1" selectedIndex="0" left="10" right="10" top="10"
bottom="10" width="100%" height="100%" change="onViewChange(event)">
<mx:Box width="100%" height="100%" show="{reloadident();}">
<identificacao:identificacao width="100%" height="
100%" id="ident"/>
< /mx:Box>
<mx:Box width="100%" height="100%" show="{reloadpais()}">
<pais:pais width="100%" height="100%" name="pais"
id="pa"/>
</mx:Box>
On Thu, Jan 28, 2010 at 1:10 PM, Fausto Vaz <[email protected]>wrote:
> Hi everyone,
>
> i need some help with viewstacks.
> Im implementing an application where i have a viewstack and i'd like to
> refresh or reload the information of my viewstack's child everytime this
> child is shown.
>
> My ViewStack:
>
>
> <mx:ViewStack id="viewstack1" selectedIndex="0" left="10" right="10" top="
> 10" bottom="10" width="100%" height="100%" change="onViewChange(event)">
>
> <mx:Box width="100%" height="100%">
>
> <identificacao:identificacao width="100%" height="
> 100%"/>
>
> < /mx:Box>
>
> <mx:Box width="100%" height="100%">
>
> <pais:pais width="100%" height="100%" name="pais"/>
>
> </mx:Box>
>
> I tried implementing a function that check for the selected item from
> viewstack but unsuccessfuly.
>
> Any ideias?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
--
You received this message because you are subscribed to the Google Groups "Flex
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/flex_india?hl=en.