Hi, I am developing one application in which i have one form containing 3 textfields.. My prob is i want to know which textfield is selected on the form...How can i dot that? I know there is one boolean varibable in item class but its not allowing me access to that??
You can use ItemStateListener to find out which item is currently being used.
However, I think to capture this the item needs to be changed for example you need to type in something in the textfield which will change the item and you can capture the item being changed.
Joined: May 01, 2007
Hi Arnb, You are right.. It didnt work as i need to type something in textfield than only state will get changed. But i got the solution.. I had to add itemCommandListener.. and add command as default command to the item.. and implemented
public void itemCommandAction(Command c,Item i)
It solved my problem [ May 03, 2007: Message edited by: shah isha ]
Joined: Feb 23, 2004
Thanks Isha for the solution. So this means you need to add a command to each item of the form. Right ?