Skip to Content
0
Former Member
Jul 11, 2006 at 10:47 AM

Radiobuttons in table

40 Views

Hi all,

I have different problems with adding radiobuttons in my table.

In my context I have:

-DynamicText (ValueNode)

--Persons (ValueNode)

---PersonsText (ValueAttribute)

-TableProperties (ValueNode)

--Selection (ValueNode)

---KeyToSelect (ValueAttribute)

--SelectedKey (ValueAttribute)

With binding I set the PersonsText in my table with a radioButton in every row.

I tried to set the selection with the following code:

int personsSize = wdContext.nodePersons().size();

ITablePropertiesElement table = wdContext.createTablePropertiesElement();

for (int i=0; i<personsSize; i++) {

ISelectionElement element = wdContext.nodeSelection().createSelectionElement();

element.setKeyToSelect(wdContext.nodePersons().getPersonsElementAt(i).getPersons());

wdContext.nodeSelection().addElement(element);

}

I try to get the selection with:

String key = wdContext.currentTablePropertiesElement().getSelectedKey();

IWDMessageManager mng = wdComponentAPI.getMessageManager();

mng.reportSuccess("selected is:" +key);

This returns null.

When I deploy and start the application also all the radiobuttons are selected.

I tried to set the propertie from the table "selectionMode" to single.

That doesn't help.

Can anyone help me with this problems please?