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: 25
Registered: ‎02-04-2013
My Device: Torch
My Carrier: T-Mobile

Buttons and Protected boolean navigation clicks

Good evening all,

I have been trying to use a protected boolean navigation click with a fieldchangelistener.  In my protected boolean navigation I send login information to an HTTP post request.  However, it seems that I can't simultaneoulsy send information to a singleton and activate a field change listener going to the next screen.  

ButtonField sendUserInfo = new ButtonField("Login") 


protected boolean navigation click (int status, int time)


// i have some shenanigans here that send information to a singleton






sendUserInfo.setChangeListener(new thefieldchangerihavebelow());


//I have a field change listener somewhere down here to move it to another screen  

Posts: 17,024
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Buttons and Protected boolean navigation clicks

check if you use networking on the event thread. if that is the case, move it to a separate thread.
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Buttons and Protected boolean navigation clicks

Also be aware that one normally uses either navigationClick or a change listener for processing events initiated by Fields.  The choice is typically down to style, but I prefer using the change listener because that means the processing code is external to the Field.