cancel
Showing results for 
Search instead for 
Did you mean: 

Checking the dynamic check box value

Former Member
0 Kudos

Hi All,

I created one check box dynamically. But now the problem is how to get whether it is checked or not in a condition. I used

if(wdContext.nodeVn_PredefinedDynContext().getVn_PredefinedDynContextElementAt(i).getAttributeAsText("SelecttoDelete"))

But it is returning string value ,so I could not check in the if condition. What are the other ways of doing it?

Thanks in advance.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Thanks

Former Member
0 Kudos

Boolean checked = (Boolean)  wdContext.nodeVn_PredefinedDynContext()
  .getVn_PredefinedDynContextElementAt(i)
  .getAttributeValue("SelecttoDelete");
if ( checked.booleanValue() )
{
}

Armin

Former Member
0 Kudos

Hi,

You can either of the thing:

if(Boolean.valueOf(wdContext.nodeVn_PredefinedDynContext().getVn_PredefinedDynContextElementAt(i).getAttributeAsText("SelecttoDelete")).booleanValue())

OR

if(wdContext.nodeVn_PredefinedDynContext().getVn_PredefinedDynContextElementAt(i).getAttributeAsText("SelecttoDelete").equals("true"))

Regards,

Murtuza

former_member1
Active Participant
0 Kudos

Try this...

wdContext.nodeVn_PredefinedDynContext().getVn_PredefinedDynContextElementAt(i).getSelecttoDelete();

It shud give you true or false if you have bound the attribute properly... while creating the dynamic checkbox...