cancel
Showing results for 
Search instead for 
Did you mean: 

Disabling a ui element at runtime

Former Member
0 Kudos

Hi experrts

I need to disable a link to action ui element that is avaliable in a talbe at runtime can u please help out in this issue

Regards

Noel

Accepted Solutions (0)

Answers (5)

Answers (5)

former_member485701
Active Participant
0 Kudos

Hi Deepak,

Following are the steps to disable the Link.

(1) You have TableNode in the context. Add one attribute of boolean type(enableLink) in Table Node

(2) Now click on Cell_Editor for Link to Action.

(3) Go to the property enabled and bind it with enableLink.

(4) Now when you want to disable it just take the TableNode like this.

wdcontext.nodeTableNode.currentTableNodeelement().setEnableLink(false).

I hope this will work for you.

Regards,

Praveen

Former Member
0 Kudos

Hi all

I have tried out all your suggerstion but its not coming could u please tell to which property i should link the boolean variable

Former Member
0 Kudos

1)Create a Value Attribute of type <b>Boolean </b>. Ex : EnBlooean

and bind that to the your LinkToActionUIElement's <b>enabled</b> property.

now use the following lines of code

in wdDoinit()

<b>wdContext.Current<your Node>Element.setEnBoolean("true"); </b>

initialize the EnBoolean value otherwise it will not give accurate result

wdContext.Current<your Node>Element.setEnBoolean("true"); // this will enable the UIElement

wdContext.Current<your Node>Element.setEnBoolean("false"); //this will disable the UIElement

Regards

Chaitanya.A

Former Member
0 Kudos

Hi Noel,

Inside the value node(which is bound to your table), create a value attribute of type 'boolean, say 'LinkEnabled'

Bind this 'LinkEnabled' to the LinktoAction celleditor of your table's column.

Then if you want to disable this link to action for i-th row of you table, give

wdContext.node<YourTablesValueNode>().get<YourTablesValueNode>elementAt(i).setLinkEnabled(false);

for all other rows, for which, linktoAction is to be enabled, give

wdContext.node<YourTablesValueNode>().get<YourTablesValueNode>elementAt(i).setLinkEnabled(true);

thanks

Smitha

Former Member
0 Kudos

Hi,

Create a calculated attribute and bind this to the <b>enabled</b> property of the ui element[link to action]

Write the logic in the getter to make it enable/disable.

Ex:

Create a context attribute of type boolean Named URI_Enabled

public boolean getURI_Enabled(IPrivateTComp.IContextElement element)

{

//@@begin getURI_Enabled

if( // Your logic)

return false;

return true;

//@@end

}

Regards

Ayyapparaj

Former Member
0 Kudos

Hi

Create a Value Attribute of type Boolean [say disui] and bind that to the your UIELement's enable property

use wdContext.Current<your Node>Element.setDisui("true"); // this will enable the UIElement

or

wdContext.Current<your Node>Element.setDisui("false"); //this will disable the UIElement

depending upon your requirement

Regards

Chaitanya.A

former_member720137
Active Participant
0 Kudos

Hi..

Make a context of type boolean and bind it to enable property of Link to Action UI element, Inside the action where u wanna disable the Link to Action UI element just set the value of this Boolean context as False.

Hope it will solve ur problem...

Regards

Puneet