cancel
Showing results for 
Search instead for 
Did you mean: 

Issue in checkbox

Former Member
0 Kudos

Hi

<b>need:</b>

I need to know how to manipulate with checkbox, like how to check/uncheck and based on the check some operations to be performed on check box.

<b>Problem:</b>

if i insert check box in my view it is always in unchecked and if i try to check it is also not to be done in my current application. i don't know for which reason it behaves like that.

if any one of you can know the reasons for it,please tell me.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi

Firsty attach the check box with "boolean" attribute.(say checkBox)

and if u want to have "checked" status initially

then put the following code in Init method():

wdContext.currentContextElement().setCheckBox(true);

and insert an action for OnToggle and u can manipulate ur operations based on the values of checkbox in that..

eg:

if(wdContext.currentContextElement().getCheckBox() == true)

//perform action 1

else

//perform action 2

thanks

srikant

Former Member
0 Kudos

Hi

Create one context attribute of type boolean.

Assign this attribute to the property 'checked' of the Checkbox.

Now in your code you can get the value of this attribute and perform operations by checking whetehr it is true or false.

To have the checkbox checked initially, you can set set value of this attribute to true in wdDoInit.

Regards,

Ajay