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: 95
Registered: ‎07-24-2013
My Device: 9380
My Carrier: Airtel
Accepted Solution

Dynamically populate ObjectChoiceField depending on the CheckBox selected

Hi all,

 

   I have some CheckBoxes on my screen and One ObjectChoiceField. I have to populate that ObjectChoiceField dynamically depending on the CheckBox selected.  I have some separate hardcoded (I have declared it on the same screen) String array for all the checkboxes.

   If i select first checkbox, then ObjectChoiceField should be populated with the corresponding String array...and so on...

 

Thanks and Warm Regards.

Developer
Posts: 19,631
Registered: ‎07-14-2008
My Device: Not Specified

Re: Dynamically populate ObjectChoiceField depending on the CheckBox selected

You just need to use

<objectChoiceField>.setChoices(<string array>);

Developer
Posts: 95
Registered: ‎07-24-2013
My Device: 9380
My Carrier: Airtel

Re: Dynamically populate ObjectChoiceField depending on the CheckBox selected

Thanks a lot Peter for the reply. Actually i should have got the answer from the supportforum itself.  It was already there in some post. I have got this on http://supportforums.blackberry.com/t5/Java-Development/ObjectChoiceField-Dynamic-Data/m-p/139215/hi...

 

Warm Regards