DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Flex BlazeDS Java Map To Flex Dynamic Object
Java:
// the key must be a String Map<String, Foo> result = new HashMap<String, Foo>();
Flex:
// injected
public var countryLabelRegexes:Object;
// example key: NATIONAL-BE
var key:String = label + REGEX_KEY_DELIMITER + (legalAddress.country as Country).isoCountryCode;
// check if the dynamic object has a property NATIONAL-BE (equivalent to java map.hasKey("NATIONAL-BE");
if(countryLabelRegexes.hasOwnProperty(key)) {
// retrieve the value
result = countryLabelRegexes[key];
}





