cancel
Showing results for 
Search instead for 
Did you mean: 

Action when a Row of a Table is modified?

Former Member
0 Kudos

Hi Brothers,

I need to identify changes made in a row of a tabel UI element.

I wrote the following code and I need an action that is executed whenever a row of a the table is changed to put this code in...

			
IE_CustomerElement e = wdContext.nodeE_Customer().getE_CustomerElementAt(i);
// identify changed rows
if (e.isChangedByClient() && e.getChangemode().equals(Properties.UNMODIFIED)) {
	// set to modified
			e.setChangemode(Properties.MODIFIED);
}

Anybody a hint?

Thanks, Johannes

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I've got it right using the wdDoBeforeAction

  public void wdDoBeforeAction(com.sap.tc.webdynpro.progmodel.api.IWDBeforeAction validation)
  {
    //@@begin wdDoBeforeAction
	  // iterate over all elements in E_Customer
		for (int i = 0; i < wdContext.nodeE_Customer().size(); i++) {

			IE_CustomerElement e = wdContext.nodeE_Customer().getE_CustomerElementAt(i);
			// identify changed rows
			if (e.isChangedByClient() && e.getChangemode().equals(Properties.UNMODIFIED)) {
				// set to modified
				  e.setChangemode(Properties.MODIFIED);
			}
		}

    //@@end
  }

Cheers, Johannes

Former Member
0 Kudos

Hello Johannes,

I think either you have to use the actions of every single Cell editor to check the cells individally. Or use the onLeadSelect Action th identify if the user selects another row and perform your checks then.

But couldn't you do what you want to do at the point of time when the user submits the data (e.g. something like a next button)?

I hope I got you right...

Ragards

Matthias