cancel
Showing results for 
Search instead for 
Did you mean: 

Populating checkboxes

Former Member
0 Kudos

Hi All,

I want to mark the checkboxes dynamically based on some condition. For that I want to use the getElement() method of the View. But in my application I am unable to get that method. Can any one help me by giving suggestion for getting that method..... Thnx in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You cannt access UI Elements any where in the view except in the wdDoModifyView()

Here u can access the user elements by

IWDCheckBox cbkbox = (IWDCheckBox) view.getElement(String CheckBoxID);

Regards

Shyam.

Former Member
0 Kudos

Hi,

The property checked contains the current value.

Create a context attribute of type boolean and bind this to the checked property of the check box

access this attribute to set and get the values

Ex:

Context attr

checkState -> boolean

To set

wdContext.currentContextElement().setcheckState(<true/false>);

To get

wdContext.currentContextElement().getcheckState();

Regards

Ayyapparaj

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi All,

I worked with both the solutions u gave and they are working. Thnx for ur valuble suggestions.

Former Member
0 Kudos

bind the checkbox with a value attribute of type boolean....on your condition

wdContext.node(ABC).set(Attribute name)(true);

Former Member
0 Kudos

Hi,

Write this code in wdDoModifyView

IWDCheckBox bc= (IWDCheckBox) view.getElement(<checkbox id>);

Regards,

Murtuza