cancel
Showing results for 
Search instead for 
Did you mean: 

CheckBoxGroup Problem

Former Member
0 Kudos

Hi,

I am using CheckBoxGroup. I am able to create the Checkboxes.

But the problem is to display Checked and unchecked the checkboxes at the initially.

The scenerio is as follows:

A user has created a record that consists of 20 checkboxes; some check boxes are checked and some unchecked.

Now, he wants to edit the claim. so selecting the record and on click the edit button.

Now the check boxes should be displayed as checked or unchecked.

how can we achieve that??

regards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create the Context Node (ex: ChkGroup) and attribute (ex: chkValue) under node.

set the cordinality and selection to 0..n.

set the data to the node, which is coming from backend.

select/deselect the check boxes using following code.

for(int i=0;i<node.size();i++) {

ele = node.getChkGroupNodeElementAt(i);

if(your condition)

node.setSelected(i,true);

else

node.setSelected(i,false);

}

I hope this solve your problem

Former Member
0 Kudos

Great Tatayya!!!!!!!!

Answers (2)

Answers (2)

Former Member
0 Kudos

hi,

first u have to declare a context attribute say(GroupVisibility) of type Visibility(DDIC Type),

bind the Visibility proprty of Group to the context attribute(GroupVisibility),

set the context attribute value as per ur requirment

and action of onToggle write the below code

if(checkbox is checked)

wdContext.currentContextElemnt.setGroupVisibility(WDVISIBILITY.VISIBLE);

else

wdContext.currentContextElemnt.setGroupVisibility(WDVISIBILITY.NONE);

hope it wil help u.

venkatakalyan_karanam
Active Contributor
0 Kudos

Hi

I think checkBox Group is not suitable for you,because if you use then at a time only one check box you can check or uncheck based on the condition.

Use individual check boxes then you have the freedom to check or uncheck any check box depending upon the bindings.

Regards

Kalyan