alguem poderia sugerir como faço para imprimir no datagrid os valores
selecionados de uma lista?

valeu..

Em 01/04/08, Rafael Soares Mendonça <[EMAIL PROTECTED]> escreveu:
>
> sabe por que o código abaixo não imprimi a segunda palavra da lista, mas
> sim a segunda letra da primeira palavra?
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
>
> <mx:Script>
> <![CDATA[
>
> import mx.controls.Alert;
>
> public function submitForm():void {
> formSender.cancel();
> formSender.send();
> }
> private function getResultOk(r:Number,event:Event):void{
> if(!r){
> Alert.show('Error sending data!!');
> return;
> }
> Alert.show( String(this.formSender.lastResult) );
> }
> ]]>
> </mx:Script>
>
> <mx:HTTPService id="formSender"
> url="http://localhost/e2/login.php";
> method="post"
> showBusyCursor="true"
> useProxy="false"
> result="getResultOk(1,event)"
> fault="getResultOk(0,event)"
> >
> <mx:request xmlns="">
> <firstname>{firstname.text}</firstname>
> <lastname>{lastname.text}</lastname>
> <email>{email.selectedItems}</email>
> <position>{position.text}</position>
> </mx:request>
> </mx:HTTPService>
>
> <mx:Form width="100%" height="100%">
> <mx:TextInput id="firstname" text="pepe"/>
> <mx:TextInput id="lastname" text="lopez"/>
>     <mx:List id="email" allowMultipleSelection="true"  x="27" y="71"
> width="193" height="140">
>             <mx:dataProvider>
>             <mx:Array>
>                 <mx:String>Nenhum</mx:String>
>                 <mx:String>Universidade</mx:String>
>                 <mx:String>Faculdade</mx:String>
>                 <mx:String>Faculdade Integrada</mx:String>
>             </mx:Array>
>             </mx:dataProvider>
>         </mx:List>
> <mx:TextInput id="position" text="director"/>
> <mx:Button label="send" click="submitForm()"/>
> </mx:Form>
>
> </mx:Application>
>
>
> ---------------------------------------------------------------------------------------------------------
>
> código PHP:
>
> <?php
>
> echo $_POST["email"]["2"];
>
> ?>
>
> Em 01/04/08, Beck Novaes <[EMAIL PROTECTED]> escreveu:
> >
> >
> > Você quer imprimir os valores que o usuário selecionou no List? Se for
> > isso basta usar a propriedade selectedItems.
> >
> > http://livedocs.adobe.com/flex/3/langref/index.html?mx/controls/listClasses/ListBase.html&mx/controls/listClasses/class-list.html
> >
> > []'s
> > Beck Novaes
> >
> > On Apr 1, 2:23 am, "Rafael Soares Mendonça" <[EMAIL PROTECTED]>
> > wrote:
> >
> > > minha lista do formulário tem a opção(ou propriedade):
> > > allowMultipleSelection="true" , mas sei como imprimir o valores
> > selecionados
> > > pelo usuário
> > >
> > > alguém sabe como poderia fazer?
> > >
> > > tentei o código abaixo, mas sem sucesso
> > >
> > > <?xml version="1.0" encoding="iso-8859-1"?>
> > > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";>
> > >
> > > <mx:Script>
> > > <![CDATA[
> > >
> > > import mx.controls.Alert;
> > >
> > > public function submitForm():void {
> > > formSender.cancel();
> > > formSender.send();}
> > >
> > > private function getResultOk(r:Number,event:Event):void{
> > > if(!r){
> > > Alert.show('Error sending data!!');
> > > return;}
> > >
> > > Alert.show( String(this.formSender.lastResult) );}
> > >
> > > ]]>
> > > </mx:Script>
> > >
> > > <mx:HTTPService id="formSender"
> > > url="http://localhost/e3/login.php";
> > > method="post"
> > > showBusyCursor="true"
> > > useProxy="false"
> > > result="getResultOk(1,event)"
> > > fault="getResultOk(0,event)"
> > >
> > > <mx:request xmlns="">
> > > <firstname>{firstname.text}</firstname>
> > > <lastname>{lastname.text}</lastname>
> > > <email>{email.selectedItem.id_funcionario}</email>
> > > <position>{position.text}</position>
> > > </mx:request>
> > > </mx:HTTPService>
> > >
> > > <mx:Form width="100%" height="100%">
> > > <mx:TextInput id="firstname" text="pepe"/>
> > > <mx:TextInput id="lastname" text="lopez"/>
> > >     <mx:List id="email" allowMultipleSelection="true"  x="343" y="71"
> > > width="141" height="140">
> > >             <mx:dataProvider>
> > >             <mx:Array id="id_funcionario">
> > >                 <mx:String>Nenhum</mx:String>
> > >                 <mx:String>Federal</mx:String>
> > >                 <mx:String>Comun.Confes.Filant.</mx:String>
> > >                 <mx:String>Estadual</mx:String>
> > >                 <mx:String>Municipal</mx:String>
> > >                 <mx:String>Particular</mx:String>
> > >
> > >             </mx:Array>
> > >             </mx:dataProvider>
> > >         </mx:List>
> > > <mx:TextInput id="position" text="director"/>
> > > <mx:Button label="send" click="submitForm()"/>
> > > </mx:Form>
> > >
> > > </mx:Application>
> >
> > > >
> >
>

--~--~---------~--~----~------------~-------~--~----~
Você recebeu esta mensagem porque está inscrito na lista "flexdev"
Para enviar uma mensagem, envie um e-mail para flexdev@googlegroups.com
Para sair da lista, envie um email em branco para [EMAIL PROTECTED]
Mais opções estão disponíveis em http://groups.google.com/group/flexdev
-~----------~----~----~----~------~----~------~--~---

Responder a