cancel
Showing results for 
Search instead for 
Did you mean: 

Control if checkbox is checked

Former Member
0 Kudos

Hello !

I've inserted a chekbox in a jsp page and, in my process, I want to control if this checkbox is checked or not.

In my process, I wrote :

boolean A2 = ((Checkbox) getComponentByName("A2")).isChecked();

where "A2" is id of my checkbox

...but this line generate an null error.

Could you help me please ?

Thank you.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

boolean A2 = ((Checkbox) getComponentByName("A2")).isChecked();

In the above code A2 should be the value of "key" field of the checkbox not the id.

Thanks,

Hari

Former Member
0 Kudos

thanks a lot !

Former Member
0 Kudos

thanks a lot !