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
Contributor
rantravee
Posts: 28
Registered: ‎09-07-2010
My Device: Not Specified

RadioButtonGroup change listener

hello,

 

I've encountered the following problem and I 'm not able to get over it. I am using a RadioButtonGroup to which I add several RadioButtonFields with some information setted in the cookies. Then I set a FieldChangeListener for the group . When the selected radio button from the group changes I receive two notifications , one for the radio that lost the selection and one for the radio that got the selection . What I would like is a mechanism so when such a change occurs I receive only one notification from the button that has the selection.   So, how could this behavior be obtained ?

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: RadioButtonGroup change listener

ignore the ones you don't want.

if/else is there for a reason.

----------------------------------------------------------
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
Contributor
rantravee
Posts: 28
Registered: ‎09-07-2010
My Device: Not Specified

Re: RadioButtonGroup change listener

Eventually that 's what  I've done. Still I would have expected to have something like this already in the api !

Contributor
sonanaren
Posts: 41
Registered: ‎05-26-2011
My Device: Developer

Re: RadioButtonGroup change listener

I also have done like you but i am creating RadioButtonField dynamically thru loop, when i tried to assign FieldChangeListener to the created RadioButtonField, i am getting errors and When i give no action is occuring

 

Can you please help me out

 

Regards,

Narendran Srinivasam

narendran.s@zanec.com

9941964931

Contributor
sonanaren
Posts: 41
Registered: ‎05-26-2011
My Device: Developer

Re: RadioButtonGroup change listener

[ Edited ]

How to create RadioButtonField dynamically using loop and get the selected RadioButtonField Label or Cookie

 

Googled and i couldn't find solution

 

Anybody have idea or sample code would be great or any reference site

 

Regards,

Narendran Srinivasan

narendran.s@zanec.com

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: RadioButtonGroup change listener

please create an own thread for your separate question
----------------------------------------------------------
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