This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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....



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TextInput
 
Similar Threads
DataGrid column/row selection based on checkbox
issue to RemoteObject based on LCDS in my flex app demo
Flex and Java cannot add anything to list
Flex-TextInput
DataGrid with row selection for editing