Suppose we return a Map or List from srever which in turn conatin
conatins Map having a 7 or mdigit key to client 
Now if we perform the objectcopy(mx.utils.ObjectCopy) of the Map
returned to the client ,then we get the browzer freezes or hangs.

Note:If we add a character or empty space to the 7 or greater digit
key the code works fine.Also this problem occurs only if the first
level map(i.e the map within the result returned by the
client)conatins a 7 or more digit key.

Is this a defect with the mx.utils.ObjectCopy class?
My application does require to send numerical keys in Map.Can aanyone
recommend a solution for this problem.


Thanks in Advance,
Adit Shetty.
Flex version Flex 1.5
Java version jdk1.5.0_12

I am attaching the code below in order to get a better understanding


Java code(Server ode)
/*
 * Created on Apr 9, 2005
 *
 * TODO To change the template for this generated file go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
package samples;
import java.util.*;

/**
 * @author ashetty
 *
 * TODO To change the template for this generated type comment go to
 * Window - Preferences - Java - Code Style - Code Templates
 */
public class Prototype {

                public  Map setDateFirst(){
                        Map mp = new HashMap();
                        Map result = new HashMap();
                        String s = "Hello";
                        
                        Map mp12 = new HashMap();
                        mp12.put("42459547",s);
                        //mp12.put("N42459547",ls); If we add a string like N 
to the key it
will work
                        mp.put("mp12",mp12);
                        return mp;
                }
        
}


Client side code:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application   x="90" y="70"
xmlns:mx="http://www.macromedia.com/2003/mxml"; xmlns:mv="*">
        <mx:Script>
        <![CDATA[
                function check(result){
                        
                        mx.controls.Alert.show("entered");
                        var z = mx.utils.ObjectCopy.copy(result);
                        mx.controls.Alert.show("copied");
                }

                
        ]]>
        </mx:Script>
        <mx:Button id = "submit"  label = "Submit" click =
"{employeeRO.setDateFirst()}"  /> 
        
        <mx:RemoteObject id="employeeRO" source="samples.Prototype"
        result="check(event.result)"
fault="alert(event.fault.faultstring, 'Error')">
        <mx:method name="setDateFirst"/>
    </mx:RemoteObject>
        
</mx:Application>



 

Reply via email to