cancel
Showing results for 
Search instead for 
Did you mean: 

one click - appear, secind - disapear

Former Member
0 Kudos

Hi, I have made a "LinkToAction", once clicked "TransparenContainer appears". Works as intended. Now, what can I do to make that "TransparentContainer" dissapear when I click on the Link second time? Regards, Balmer

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

create a context attribute of type boolean

Create another context attribute of type visibility

and bind this to the visible property of the transparent controller.

and do the following in the init

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

//Initially setting to true

//this attribute is used to store the state

wdContext.currentContextElement().setState(true);

in the action Hander of linkto action do as follows


//Check for the state
if(wdContext.currentContextElement().getState())
 {
    wdContext.currentContextElement().setState(false);
    wdContext.currentContextElement().setTransVisibility(WDVisibility.NONE);
}
else
 {
wdContext.currentContextElement().setState(true);
    wdContext.currentContextElement().setTransVisibility(WDVisibility.VISIBLE);
}


Regards

Ayyapparaj

Former Member
0 Kudos

works exactly as I wanted, Thank you very much.

Answers (0)