cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to save Data when toggling checkboxes.

Former Member
0 Kudos

Hi All,

I've the following problem.

After the requirements changed, i have to remove my save button and save instead by clicking checkboxes or radio-buttons.

Scenario:

I read some data out of an .xml configfile, with this data I dynamically creat a context node with some contextnodes section(node)->group(node)->3Attributes.

This is done in the wdinit().

After having my context I dynamically create a table in an tranparent container and bind it to the 1.contextnode. The tablerows represent the 2.node and the 3 columns represent the attributes of the 2nd node. So far so good.

Now I have 1 column with radio buttons and 1 column with checkboxes.

By clicking an checkbox or clicking a radiobutton i'll call an action. It's no problem getting the status of the checkbox in myaction, but I can't figure out how to get information about the row where the checkbox is in.

I need to know which contextnode(row) has been changed...

Thanks in advance.

michael

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You can get the "row" (node element) by mapping the event parameter "nodeElement" to an action parameter:

IWDCheckBox cb = (IWDCheckBox) view.getElement("ID-of-checkbox");
cp.mappingOfOnToggle().addSourceMapping
(
  "nodeElement",
  "selectedElement" /* name of action parameter */
);

The action parameter may have as type either IWDNodeElement or the strongly typed I<node-name>Element.

Apart from that, I don't think it is a good idea to save data when a check box is clicked.

Armin

Former Member
0 Kudos

Hi,

this really helped me out.

Is there a list of possible Attributes like "nodeElement" which can be mapped to an Action?

To the Idea of saving data by clicking a checkbox.

The Webdynpro app is supposed to work in an html site where the navigation logic is inside the html.

The wdDoExit(); isn't called by navigating via html commands, so I've no idea on how to save my data without a button.

Cheers,

Michael

Answers (0)