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

Posts: 15
Registered: ‎07-01-2011
My Device: 8110
My Carrier: vodafone

FocusChangeListener called twice for FOCUS_GAINED

final HorizontalFieldManager horizontalFieldManager = new HorizontalFieldManager();
basicEditField = new BasicEditField("Enter Name:", "", 100,
basicEditField.setFocusListener(new FocusChangeListener() {
	public void focusChanged(Field field, int eventType) {
		if(eventType == FOCUS_GAINED){
				// do something

 I have very simple configuration, there is one edittext wrapped in horizontal field manager.


Suppose currenlty I have focus on button or other field which is outside  the above HorizontalFieldManager
When I click on that edit text focusChanged for FOCUS_GAINED event type is called twice


When move focus through navigation key then it is called once.


I have observer this issue in JDE 7.0 and JDE 7.1 not in JDE 6.0


One more weared behavior when that edit text is added in VerticalFieldManager then focusChanged for FOCUS_GAINED is called once.


Don't why different behavior for different JDEs and also changed when manger changes.


Please help. I wanted to be called once.


Or is there any configuration issue.