cancel
Showing results for 
Search instead for 
Did you mean: 

Lead selection problem in table

Former Member
0 Kudos

Dear All,

I have a table , in which if one of the fields (inputfield) is changed, then on the onEnter event, another filed in the same row of the table should be updated.

However, when the inputfiled is selected for updation the corresponding row is not selected as the lead selection.

So the field of another row which is the lead selected one, gets updated.

How do I solve this problem?

Thanks and regards,

Mayuresh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Create a paramter to the onAction of type IWDNodeElement or <Iprivate>your Node element.

Then map the paramter to the action using the following code in wdDomodify


  if(firstTime)
	  {
		  IWDInputField inputField = (IWDInputField)view.getElement("<Your input field>");
		  
		  //Create a parameter of type IWDNodeElement and name it as "nodeElement"
		  inputField.mappingOfOnEnter().addSourceMapping("nodeElement", "nodeElement");
	  }

Now your onEnter action should look some what similar to the following


public void onActionOnEnter(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, com.sap.tc.webdynpro.progmodel.api.IWDNodeElement nodeElement )
  {
    //@@begin onActionOnEnter(ServerEvent)
	  //Access your attribute lets say Name as follows
	  String name = (String)nodeElement.getAttributeValue("Name");
	  //Assigning to the other attribute which is bound to other field
	  nodeElement.setAttributeValue("OtherField", name);
    //@@end
  }

If you are working with CE you can use paramter instead of the code in the wdDomodify part.

Regards

Ayyapparaj

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Thanks for the replies.

If you are working with CE you can use paramter instead of the code in the wdDomodify part.

I am working with CE.

How do I use parameter without coding in WDModify?

There is also another way without any coding. Change the table property "compatibilityMode"

I didn't find the compatibilityMode property for the table.

Thanks and regards,

Mayuresh

Former Member
0 Kudos

Hi,

Right click on the UI element Textfield from Outline

and select Parameter Mapping

Map parameter by drag and drop.

Regards

Ayyapparaj

Former Member
0 Kudos

Above solution certainly works. There is also another way without any coding. Change the table property "compatibilityMode"

Cheers,

~kranthi

Former Member
0 Kudos

Hi ,

on the OnActionEnter Event just check for the LeadSelection is zero, then Update the other field of the row.

venkat