What does shopping.Empty() do?  Could it be setting items in the arr array to null?  Have you put any debugging code in (trace statements) to make sure that the array is populated with what you think it should be?  Maybe it’s also worth trying to call your RemoteObject directly passing in the data without going through the EventBroadcaster just to make sure it’s not your command later on that’s messing things up?

 

Matt

 


From: [email protected] [mailto:[email protected]]
Sent: Thursday, April 21, 2005 7:26 AM
To: Flex Coders
Subject: [flexcoders] Help ValueObject

 

Hi,
i have a simple ActionScript function that call a j2ee method

here my ActionScript file


function Azzera()
      {
             var  arr:Array;
           
           
             var vendita:CVenditaVO;
             arr=[];
           
             var pk:CVenditaPK;
             for(var i=0; i < shopping.items.length; i++)
             {
               var vo:CScontrinoVO  = CScontrinoVO(shopping.items[i]);
               pk=new CVenditaPK();
               vendita=new CVenditaVO();
             
               pk.datadi=new Date();
           pk.nrscdi=vendite;
           pk.oravdi='00';
           pk.shopdi='Z01';
           vendita.pk=pk;
           vendita.stagdi=vo.stag$a;
               vendita.modedi=vo.mode$a;
               vendita.matedi=vo.mate$a;
               vendita.varidi=vo.vari$a;
               vendita.colodi=vo.colo$a;
               vendita.cdtgdi=vo.cdtg$a;
               vendita.tgsidi=vo.tgsi$a;
               vendita.pvendi=vo.pven$a;
               vendita.qtavdi=1;
               vendita.scondi=0;
               vendita.tipodi='VENDITA';
               arr.push(vendita);
             }
           
             controller=new PdmController();
            
EventBroadcaster.getInstance().broadcastEvent("shop",arr,"update",0,0);
             shopping.Empty();
             mx.core.Application.application.vobarcode = null;
      }

When in my j2ee side debug, the Flex/Array arrived ok and the j2ee
method respond ok  with correct array size, but all values are null ?
Can you help me please.
Devis








Yahoo! Groups Links

Reply via email to