This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Flex and the fly likes TextInput Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Flex
Bookmark "TextInput " Watch "TextInput " New topic
Author

TextInput

Booma Devi
Ranch Hand

Joined: Nov 02, 2011
Posts: 61
Hi,

Can any one please help me how to get the key value from the map in flex..?

I have used the property file in server side which contains the value as K=1000 B=100000. In flex side, I have red the key and value pair..

What I need this, when I type the string say 1K in the textInput, i want to retrieve the K value (1000) from the flex side...


Code is below:

Praveen Kumar M K
Ranch Hand

Joined: Jul 03, 2011
Posts: 256
var persons:Object=event.result as Object;

for(var key:String in persons)
{
var currKey:String=key;
var currValue:Object=persons[key];

}


This looks a little strange. "persons" is a single object and its being used in a foreach loop(which doesnt make sense)..."key" in the first iteration would probably be the string representation of persons reference variable and not the 1000 that you want.
Booma Devi
Ranch Hand

Joined: Nov 02, 2011
Posts: 61
Thanks for your reply praveen.. I solved it already... :-)
Booma Devi
Ranch Hand

Joined: Nov 02, 2011
Posts: 61
Hi Praveen,

Could you please help me to solve this....

I have one textInput which allows only 10 chars... If I enter the text as 1T in spark text input then it will become 1,000.00 (here length is 8)..

My requirement is I dont want to allow the char K again in textInput because if I enter the character K then it will exceeds the maximum character... How to restrict the character K in textinput.. so that we cant
exceed the max char limit...


Thanks in Advance....



 
Don't get me started about those stupid light bulbs.
 
subject: TextInput