Funcionou!!!!!!

caraca, o dia todo pra resolver isso =/

ficou assim:
<mx:Repeater id="rep_furo"
dataProvider="{parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.furos.furo}">
   <mx:Label  text="{'Furo: '+
parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.furos.furo[rep_furo.currentIndex]}"
width="100%" />
</mx:Repeater>

mudei a estrutura do xml pra src_furo ser o valor da tag e naum um
atributo, aí rolou.

tanto dando um warning aqui, mas até eu achar solução melhor, vou
deixar assim.

Valewww pela paciência.

On 3 abr, 17:21, Pat <[EMAIL PROTECTED]> wrote:
> assim,
> ao invés de mexer em várias coisas da aplicação, acho qeu o jeito que
> eu estava fazendo ja estava meio caminho andado
>
> <mx:Repeater id="rep_furo"
> dataProvider="{parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.f­uros.furo}">
>    <mx:Label  text="{'Furo: '+ XML(rep_furo.currentItem)[EMAIL PROTECTED]"
> width="100%" />
> </mx:Repeater>
>
> assim, aparece a palavra "Furo:" na quantidade certinha, aparece o
> currentIndex,
> o problema só está em pegar o valor do atributo src_furo, é aqui que
> tah o problema
>
> =(
>
> On 3 abr, 16:05, Pat <[EMAIL PROTECTED]> wrote:
>
>
>
> > sim, entaum como ficaria a função de retorno do meu httpservice?
> > fiz do jeito abaixo (creio estar errado, pois tenho que setar do furos
> > pra frente...como?), e já me aparece o erro:
>
> > Access of undefined property rep_furo. =(
>
> > public function resultado_detalhe(event:ResultEvent):void{
> >         if (event.result.produtos != 'null'){
> >                 if (event.result.produtos.item is ArrayCollection){
> >                    arrProdutos = event.result.produtos.item as
> > ArrayCollection;
> >                 } else {
> >                         newArray =
> > ArrayUtil.toArray(event.result.produtos.item);
> >                     arrProdutos = new ArrayCollection(newArray);
> >                 }
> >                 arrMacho = arrProdutos;
> >                 rep_furo.dataprovider = arrMacho; //dataprovider do
> > meu repeater
> >         } else {
> >                 Alert.show('O produto não foi encontrado.');
> >                 viewStack.selectedIndex = 0;
> >         }
>
> > }
>
> > On 3 abr, 15:59, Beck Novaes <[EMAIL PROTECTED]> wrote:
>
> > > Solução rápida para isso:
>
> > > <mx:ViewStack creationPolicy="all">
>
> > > Embora não seja a melhor solução. Veja mais 
> > > em:http://blog.dclick.com.br/2008/02/26/cafe-com-flex-parte-ii/
>
> > > []'s
> > > Beck Novaes
>
> > > On Apr 3, 2:36 pm, Pat <[EMAIL PROTECTED]> wrote:
>
> > > > o meu repeater está no selectedIndex = 1 to meu viewStack, quando
> > > > tento setar o dataprovider ele, ele diz que o objeto (repeater) não
> > > > existe.
>
> > > > meu httpservice:
> > > > <mx:HTTPService
> > > >             id="sql_vitrineDetalhe"
> > > >             method="POST"
> > > >             url="http://intranet.na5.com.br/osgtungaloy.com.br/xml/
> > > > xml_vitrine_detalhe.asp"
> > > >             fault="onError(event)"
> > > >             result="resultado_detalhe(event);">
> > > >         <mx:request xmlns="">
> > > >                 <cd_referencia>{cd_referencia}</cd_referencia>
> > > >                 </mx:request>
> > > >     </mx:HTTPService>
>
> > > > função de retorno do httpservice:
> > > > public function resultado_detalhe(event:ResultEvent):void{
> > > >         if (event.result.produtos != 'null'){
> > > >                 if (event.result.produtos.item is ArrayCollection){
> > > >                    arrProdutos = event.result.produtos.item as 
> > > > ArrayCollection;
> > > >                 } else {
> > > >                         newArray = 
> > > > ArrayUtil.toArray(event.result.produtos.item);
> > > >                     arrProdutos = new ArrayCollection(newArray);
> > > >                 }
> > > >                 arrMacho = arrProdutos;
> > > >         } else {
> > > >                 Alert.show('O produto não foi encontrado.');
> > > >                 viewStack.selectedIndex = 0;
> > > >         }
>
> > > > }
>
> > > > meu viewstack:
> > > > <mx:ViewStack id="viewStack" width="100%" height="100%">
> > > >    <mx:HBox width="100%" height="100%" verticalScrollPolicy="off"
> > > > horizontalScrollPolicy="off">
> > > >       <componente:com_pesquisa arrPesquisa_ponta="{arrPonta}"
> > > > arrPesquisa_subcategoria="{arrSubcategoria}" width="200"
> > > > height="100%" />
> > > >       <componente:com_vitrine arrDados="{arrMachos}" />
> > > >    </mx:HBox>
> > > >    <componente:com_vitrine_detalhe arrDados_detalhe="{arrMacho}" />
> > > > </mx:ViewStack>
>
> > > > com_vitrine_detalhe:
>
> > > > <?xml version="1.0" encoding="utf-8"?>
> > > > <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
> > > > height="100%" backgroundColor="#ffffff" cornerRadius="3"
> > > > creationComplete="init()">
> > > >         <mx:Script>
> > > >                 <![CDATA[
> > > >                         import mx.collections.ArrayCollection;
> > > >                         [Bindable] public var 
> > > > arrDados_detalhe:ArrayCollection;
> > > >                 ]]>
> > > >         </mx:Script>
>
> > > >         <mx:XMLListCollection id="xmllcTratado"/>
>
> > > >         <mx:VBox width="50%" height="100%">
> > > >                 <mx:Label
> > > > text="{parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_norma_­­­pt}"
> > > > width="100%" id="txt_norma" fontWeight="bold" fontSize="12"/>
> > > >                 <mx:Label text="Referência:
> > > > {parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_referencia}"
> > > > id="txt_referencia" width="100%"/>
> > > >                 <mx:HBox width="100%" height="100%" 
> > > > verticalAlign="middle">
> > > >                         <mx:Image id="txt_imagem" width="50%">
>
> > > > <mx:source>{parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_i­­­magem}</
> > > > mx:source>
> > > >                         </mx:Image>
> > > >                         <mx:VBox width="50%" height="100%">
> > > >                                 <mx:Label text="Tipos de Furo"/>
> > > >                                 <mx:Repeater id="rep_furo" 
> > > > dataProvider="{xmllcTratado}">
> > > >                                         <mx:Label  text="{'Furo: '+ 
> > > > [EMAIL PROTECTED]"
> > > > width="100%" />
> > > >                                 </mx:Repeater>
>
> > > >                                 <mx:Label text="Tipo:
> > > > {parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_ponta_pt}"/
>
> > > >                                 <mx:Label text="Norma:
> > > > {parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_simbolo}"/
>
> > > >                                 <mx:Label text="Material e Tratamento"/>
> > > >                                 <mx:Label text="Ângulo da Hélice"/>
> > > >                         </mx:VBox>
> > > >                 </mx:HBox>
> > > >                 <mx:Panel width="100%" height="100" layout="absolute" 
> > > > title="Grupos
> > > > de Materiais">
> > > >                 </mx:Panel>
> > > >         </mx:VBox>
>
> > > >         <mx:VBox width="50%" height="100%" horizontalAlign="center">
> > > >                 <mx:Button label="Voltar"
> > > > click="parentDocument.viewStack.selectedIndex = 0" textAlign="center"/
>
> > > >                 <mx:Image width="80%" height="80"/>
> > > >                 <mx:Label text="Especificações do Produto"/>
> > > >                 <mx:Image>
>
> > > > <mx:source>{parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.ds_i­­­magem_especificacao}</
> > > > mx:source>
> > > >                 </mx:Image>
>
> > > >         </mx:VBox>
> > > >         <mx:Script>
> > > >        <![CDATA[
> > > >            public function init():void {
> > > >                xmllcTratado.source =
> > > > XMLList(arrDados_detalhe).item.furos.furo;
> > > >            }
> > > >        ]]>
> > > >      </mx:Script>
> > > > </mx:HBox>
>
> > > > On 3 abr, 15:09, Beck Novaes <[EMAIL PROTECTED]> wrote:
>
> > > > > Chute: Tente setar o dataProvider do seu repeater no evento Result da
> > > > > chamada do seu HTTPService.
>
> > > > > []'s
> > > > > Beck Novaes
>
> > > > > On Apr 3, 2:00 pm, Pat <[EMAIL PROTECTED]> wrote:
>
> > > > > > Tentei fazer igualzinho vc, criei o init e tudo, mas ele não aceita
>
> > > > > > <mx:Script>
> > > > > >        <![CDATA[
> > > > > >            public function init():void {
> > > > > >                xmllcTratado.source =
> > > > > > parentDocument.sql_vitrineDetalhe.lastResult.produtos.item.furos.furo;
> > > > > >  //
> > > > > > meu httpservice
> > > > > >                        ou
> > > > > >                xmllcTratado.source =
> > > > > > parentDocument.sql_vitrineDetalhe.lastResult.item.furos.furo; // meu
> > > > > > httpservice
> > > > > >            }
> > > > > >        ]]>
> > > > > >    </mx:Script>
>
> > > > > > ele dá esse erro, quando vou acessar a página:
> > > > > > TypeError: Error #1009: Cannot access a property or method of a null
> > > > > > object reference.
>
> > > > > > On 3 abr, 14:31, Pat <[EMAIL PROTECTED]> wrote:
>
> > > > > > > Nossa, aqui num rola!
>
> > > > > > > se eu deixo o lastResult.produtos, ele escreve "Furos:" 4vezes 
> > > > > > > mas sem
> > > > > > > o valor do source (que já mudei pra src_furo, pra num dar 
> > > > > > > conflito com
> > > > > > > as palavras do flex), se eu tiro o .produtos, ele não escreve 
> > > > > > > "Furo:"
> > > > > > > nenhuma vez, ou seja, errado, pq eu tenho quatro tipos de Furos.
>
> > > > > > > On 3 abr, 14:17, Luis Eduardo - Suprasis Softwares
>
> > > > > > > <[EMAIL PROTECTED]> wrote:
> > > > > > > >     Oi Pat,
>
> > > > > > > >     Para enviar o xml do lastResult é só vc usar um trace 
> > > > > > > > normal e
> > > > > > > > copiar e colar do console.  Mas vc enviou o xml direitinho!  
> > > > > > > > Era isso mesmo.
> > > > > > > >     O problema, acho eu, é que o primeiro nó do lastResult, o 
> > > > > > > > "produtos"
> > > > > > > > vai se tornar o próprio lastResult, então ele não precisa ser 
> > > > > > > > referenciado.
> > > > > > > >     Ficaria uma linha assim:
>
> ...
>
> mais »- Ocultar texto entre aspas -
>
> - Mostrar texto entre aspas -
--~--~---------~--~----~------------~-------~--~----~
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