Boa tarde!
Sou novato no Adobe Flex, e estou usando a IDE 4.6. Estou desenvolvendo o frontend de uma aplicação e estou com algumas dificuldades! Como o Flex passa valores?
Seguinte, preciso passar os valores de uma combobox como String para um Servlet tratar essa informação. Só que não faço a menor idéia. Alguém tem alguma apostila, ou como me passar a maneira de fazer?
O cenário é o seguinte:
Tenho duas combobox, onde a primeira passa um valor String para o preenchimento da outra. A primeira combobox, é preenchida automaticamente, “chumbada” no mxml. A segunda vem do XML externo que estou tentando manipular, mas sem sucesso, segue o código:
MXML
<s: Panel width="100%" height="100%">
<s:Image id="Logo" x="19" y="10" source="images/logo.fw.png" />
<s:Form x="19" y="108" width="311" height="222">
<s:FormHeading label="Selecione XPTO:"/>
<s:FormItem label="XPTO">
<s:ComboBox id="cboXPTO" labelField="name" selectedIndex="0">
<s:dataProvider>
<mx:ArrayList>
<fx:String>XPTO</fx:String>
<fx:String>XPTO1</fx:String>
<fx:String>XPTO2</fx:String>
<fx:String>XPTO3</fx:String>
<fx:String>XPTO4</fx:String>
</mx:ArrayList>
</s:dataProvider>
</s:ComboBox>
</s:FormItem>
<s:FormItem>
<s:Button label="Enviar" click="sendCboItemHandler()"/>
</s:FormItem>
</s:Form>
<s:Spacer x="335" y="110" width="14" height="10"/>
<s:Form x="352" y="107" width="292" height="222" visible="false" id="XPTOITEM">
<s:FormHeading label="Seleciona XPTOITEM:"/>
<s:FormItem label="Nome XPTOITEM.:">
<mx:ComboBox id="cboXPTOITEM" dataProvider="{}" labelField="CBXPTOITEM"/>
</s:FormItem>
</s:Form>
</s: Panel>
HTTPSERVICE:
<s:HTTPService id="XPTOITEM" url="{urlConsulta}" result="desResult(event)" useProxy="false">
<s:request>
<action>GetXPTOITEM</action>
<XPTO>{selecionaXPTO}</XPTO>
<XPTOITEM>{cboXPTOITEM}</XPTOITEM>
</s:request>
</s:HTTPService>
Funcao que pega a url:
public function init():void{
urlConsulta = 'http://xx.xxx.x1.68:8080/XXXXXXXXX/ControllerServlet';
}