Hi Akshar.

My application is already this way. See:

                <mx:State name="stEscolhaAreasxUnidades" basedOn="">
                        <mx:AddChild
                                relativeTo="{panel}"
                                position="firstChild">

                                <mx:Box id="areasUniBox" width="100%" 
height="100%"
verticalAlign="middle" horizontalAlign="center">

        <mx:HBox>
                                                <mx:Image 
source="@Embed('icones/info.png')"/>
                                                <mx:Label 
styleName="tituloArea" text="Escolha uma das áreas de
operação abaixo" />
                                        </mx:HBox>
                                        <mx:HBox>
                                                <mx:LinkBar
                                                        buttonMode="true" 
itemClick="listarAreasClickHandler(event);">
                                                        <mx:dataProvider>
                                                                <mx:Object 
icon="@Embed(source='imagens/1.gif')" area="1"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/2.gif')" area="2"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/3.gif')" area="3"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/4.gif')" area="4"/>
                                                        </mx:dataProvider>
                                                </mx:LinkBar>
                                        </mx:HBox>
                                        <mx:HBox>

        <mx:LinkBar
                                                        buttonMode="true" 
itemClick="listarAreasClickHandler(event);">
                                                        <mx:dataProvider>
                                                                <mx:Object 
icon="@Embed(source='imagens/5.gif')" area="5"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/6.gif')" area="6"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/7.gif')" area="7"/>
                                                                <mx:Object 
icon="@Embed(source='imagens/8.gif')" area="8"/>
                                                        </mx:dataProvider>
                                                </mx:LinkBar>
                                        </mx:HBox>
                                </mx:Box>
                        </mx:AddChild>
                </mx:State>

                <mx:State name="stListaEmpresas" 
basedOn="stEscolhaAreasxUnidades">
                        <mx:AddChild id="stListaEmpresasChild"
                                relativeTo="{areasUniBox}"
                                position="lastChild">

                                <mx:VBox id="listaEmpresasBox"
                                        width="100%" horizontalAlign="center">
                                        <mx:HBox>
                                                <mx:Image 
source="@Embed('icones/info.png')"/>
                                                <mx:Label 
styleName="tituloArea" text="Selecione uma empresa" />
                                        </mx:HBox>
                                        <mx:ComboBox id="listaEmpresas"
                                                prompt="Selecione uma empresa"

        dataProvider="{dpListaEmpresas}"
change="listaEmpresasChangeHandler(event);"/>
                                </mx:VBox>
                        </mx:AddChild>
                </mx:State>


[Bindable] private var dpListaEmpresas:ArrayCollection;
private function listarAreasClickHandler(event:ItemClickEvent):void
{
        areaSelecionada = event.item.area;
        getDataSVC("ListarEmpresas", "areCod="+areaSelecionada,
listarEmpresasCompleteHandler);
}

private function listarEmpresasCompleteHandler(event:Event):void
{
        dpListaEmpresas = new ArrayCollection();

        try
        {
                var tempLoader:URLLoader = URLLoader(event.target);
                var dados:Object = JSON.decode(tempLoader.data);
                var objDados:Object = dados[svcMetodo+'Result'];


        for(var i:String in objDados)
                {
                        dpListaEmpresas.addItem({
                                label: objDados[i].EmHRzsAbr,
                                cod: objDados[i].EmpCod
                        });
                }

                if(dpListaEmpresas.length <= 0) msgErro("Atenção!","Nenhuma
ocorrência encontrada.");
                else
                {

        if(currentState != "stListaEmpresas")
                        {
                                currentState = "stListaEmpresas";
                        }

                        dpListaEmpresas.refresh();
                }

        } catch (error:Error)
        {
                msgErro("Erro!",error.toString());
        }


        CursorManager.removeBusyCursor();
}

thanks


On 19 maio, 23:10, Akshar Kaul <[email protected]> wrote:
> be sure you refresh the dataprovider of the combo box.
>
> Akshar Kaul
>
> On Thu, May 20, 2010 at 00:39, Berkowitz - Fator13 <
>
>
>
>
>
> [email protected]> wrote:
> > Hello everybody!
>
> > I have an application with three states, where:
> > In the first state the user must select an image.
> > The second presents a combobox with some information related to the
> > image that the user selected in the previous state. But the problem is
> > already happening here: when I first click on the image everything
> > works fine, but the next it executes all the methods correctly, but
> > the combobox is not updated.
> > Can anyone give me a help please?
>
> > Picture 1: 1st state
>
> >http://picasaweb.google.com/lh/photo/S4MdYP-bmZIYFlT2pQZVG98JK9F_j2OQ...
>
> > Picture 2: 2nd state (when an image is selected)
>
> >http://picasaweb.google.com/lh/photo/EfQD2kser_pFzu-GZhO2b98JK9F_j2OQ...
>
> > Picture 3: 2nd state (when another image is selected. Notice that the
> > combobox values were not updated)
>
> >http://picasaweb.google.com/lh/photo/FjUeOGKSfnvImApCwE_oVt8JK9F_j2OQ...
>
> > Image 3_2: 2nd state as it should be
>
> >http://picasaweb.google.com/lh/photo/xSOps0lg5NHQbCUocIUCOt8JK9F_j2OQ...
>
> > Thank you!
>
> > --
> > 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%2bunsubscr...@googlegrou 
> > ps.com>
> > .
> > 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 
> athttp://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.

Reply via email to