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: 1
Registered: ‎03-28-2011
My Device: BlackBerry Torch 9800
My Carrier: Vodafone

registration screen radiobuttonfield problem

Hi! I'm new to Java and Blackberry and i'm stuck with a registration screen, due to the fallowing: I have a registration screen, where i show 2 radiobuttons, male and female. Only these 'labels' are not for me to write, it's a value and a tag that i request to a webservice. What i needed was something like: MyRadioButton rb1=(String label, String value, Group rbg); and it's Super(label, value, group); ---this value more of an internal label ID, so to speak, a pk_id.--- so i could, after, retrieve which Rbutton was selected and it's value, so i could send it back when i click the Register Button. I have an example of how to do it, but not for blackberry: Gender[] gender = WebServCall.GetUserGender(); if (gender != null && gender.length == 2) { holder.radiob1.setText(gender[0].genderType); holder.radiob1.setTag(gender[0].PK_ID); holder.radiob2.setText(gender[1].genderType); holder.radiob2.setTag(gender[1].PK_ID); } else { //alert } } static class ViewHolder { RadioButton radiob1; RadioButton radiob2; } (...) //Get the inserted information, by the user ... RadioButton register_buffer_Gender1 = (RadioButton) findViewById(R.id.radiob1); RadioButton register_buffer_Gender2 = (RadioButton) findViewById(R.id.radiob2); ... boolean check1 = register_buffer_Gender1.isChecked(); boolean check2 = register_buffer_Gender2.isChecked(); .... Could you give and example of how to do this, but for blackberry?