Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 140
Registered: ‎02-05-2009
My Device: 8900
My Carrier: Airtel India
Accepted Solution

How it works for objectChoice group "FOCUS_CHANGED"

Hi All,

 

can anybody tell me how FOCUS_CHANGED works for Object choice group, when we change our focus in dropdown window?

actully i am using:

public void focusChanged(Field field,int eventType){

 

if (eventType == FOCUS_CHANGED){
                        System.out.println("FOCUS_CHANGED");
              }else if(eventType == FOCUS_GAINED){
                        System.out.println("FOCUS_GAINED");
              }else if(eventType == FOCUS_LOST){
                        System.out.println("FOCUS_LOST");
                    }

}

 

it nevers print "FOCUS_CHANGED" ,,but it works for both FOCUS_GAINED and FOCUS_LOST.

 

Please help me out.

Its urgent.

 

Thanks

Ashutosh

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: How it works for objectChoice group "FOCUS_CHANGED"

Well you are right, It didn't Fire for me either. You can use "FieldChangeListener" it will server your purpose.

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 140
Registered: ‎02-05-2009
My Device: 8900
My Carrier: Airtel India

Re: How it works for objectChoice group "FOCUS_CHANGED"

thanks for reply.

 

HI

 

I need to refresh my window,when the user changes value in objectchoice field.

if i use FieldChangeListener ,it called 'fieldChanged' method immediatily when we do scroll on ObjectChoice field.

But i need to fire an event when we user select other value from objectchoice group onclick not on scrolling.

 

 

Please suggest m,how can i do this.

 

 

Developer
Posts: 140
Registered: ‎02-05-2009
My Device: 8900
My Carrier: Airtel India

Re: How it works for objectChoice group "FOCUS_CHANGED"

Thanks,

I am able to do with the help of "FieldChangeListener".

 

Developer
Posts: 329
Registered: ‎12-17-2010
My Device: Not Specified
My Carrier: developer

Re: How it works for objectChoice group "FOCUS_CHANGED"

Hi ashutoshg  ,

 

I am facing the problem same like you i want to do same like this when user scrolls the fieldChange lisener  is getting called but i want to do some functionality when user clicks on choice..