cancel
Showing results for 
Search instead for 
Did you mean: 

I want to hide Group when CheckBox check?

Former Member
0 Kudos

Hi,

I want to hide Group when CheckBox check .How i do this ? Please explain from start to end.What ui i have to use " CheckBox" or "CheckBoxGroup",.

Regards,,

Gurprit Bhatia

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi ,

1) Create Check box

2)Create a value attribute check" of type boolean -

3)Create a value attribute visible of type visibility -

bind the checked property of the check box to valueattribute check

bind the visibility property of the Group to value attribute visible

init() method of the view - intialize the 2 value attributes

check - false

wdContext.currentContextElement().setCheck("false");

visible - VISIBLE

wdContext.currentContextElement().setVisible(WDVisibility.VISIBLE");

create onToggle event for the check box

if(wdContext.currentContextElement().getCheck())

{

wdContext.currentContextElement().setVisible(WDVisibility.NONE);

}

else

wdContext.currentContextElement().setVisible(WDVisibility.VISIBLE);

Regards,

Sunitha Hari

Former Member
0 Kudos

Hi,

you can use " CheckBox" or "CheckBoxGroup".

1) declare a context attribute say(GroupVisibility) of type Visibility(DDIC Type).

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

3) Then depending on conditon set the context attribute value.

Action of onToggle write the below code:

if(checkbox checked)

wdContext.currentContextElemnt.setGroupVisibility(WDVISIBILITY.VISIBLE);

else

wdContext.currentContextElemnt.setGroupVisibility(WDVISIBILITY.NONE);

Regards,

Jhansi