cancel
Showing results for 
Search instead for 
Did you mean: 

Parameter mapping error in webdynpro java

Former Member
0 Kudos

Hi All,

I have a table and the columns of the table are created dynamically(assume I have Colum A & Column B).

The table cell editor is input field. On hitting enter on the input field of the column, I want to get the column name.

But I am getting com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Parameter col not found.

Where am I going wrong?

In wdModify view I have the following lines of code

retString[] // this array contains the column header names

int j = retString.length;

for(int i=0;i<j;i++)

{

IWDAttributeInfo att_Adjust_value = wdContext.nodeFinalStockTons().getNodeInfo().addAttribute("att_Adjust_value"+i,"ddic:com.sap.dictionary.integer");

IWDAttributeInfo attrib_Adjust = wdContext.nodeFinalStockTons().getNodeInfo().getAttribute("att_Adjust_value "+i);

IWDTableColumn tabColumn_Adjust =(IWDTableColumn)view.createElement(IWDTableColumn.class,"ColumnAdjust"+i);

//Add caption to Column

IWDCaption Cap_Adjust = (IWDCaption)view.createElement(IWDCaption.class,"CapTonsAdjust"+i);

Cap_Adjust.setText(retString<i>);

tabColumn_Adjust.setHeader((IWDCaption)Cap_Adjust);

//Table cell editor is of type Input field

IWDInputField Input_Field_Adjust = (IWDInputField)view.createElement(IWDInputField.class,"Input_Field_Adjust"+i);

Input_field_Adjust.bindValue(attrib_Adjust);

tabColumn_Adjust.setTableCellEditor((IWDTableCellEditor)Input_Field_Adjust);

table_adjust =(IWDTable)view.getElement("AdjustTable" ); // get Table

table_adjust.addColumn(tabColumn_Adjust); //bind column

//Creating action

IPrivateFINAL_STOCK_View.WDActionEventHandler adjustActHandler= IPrivateFINAL_STOCK_View.WDActionEventHandler.ON_HIT_ENTER;

IWDAction genericEventAction=wdThis.wdCreateAction(adjustActHandler, "onActiononHitEnter");

wdThis.wdGetOnHitEnterAction();

genericEventAction.setEnabled(true);

IWDInputField inputField =

(IWDInputField)((IWDTableColumn)(table_adjust.getView().getElement("ColumnAdjust"i))).getView().getElement("Input_Field_Adjust"i);

inputField.setOnEnter(wdThis.wdGetHITAction());

inputField.mappingOfOnEnter().addSourceMapping("col",retString<i>); // source name, new name

}

public void onActionHitEnter(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent, java.lang.String col)

{

}

Edited by: Shilpa KG on Jul 6, 2009 11:47 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

To get the column ID in the action handler for the input field's "onEnter" event, you have to add a parameter "col" to your action and action handler, and you have to define a parameter mapping like this:


IWDTableColumn column = ...;
inputField.mappingOfOnEnter().addParameter("col", column.getId()); /* use setString() in newer releases */

Armin

P.S: Please edit your message and put code-tags around your code.

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi All,

Thanks for the reply.

My issue got solved.

	
 colName = retString<i> ;
inputField.mappingOfOnEnter().addParameter("col",colName);  

Regards,

Shilpa.

Edited by: Shilpa KG on Jul 7, 2009 8:57 AM

Former Member
0 Kudos

Hi,

Just have a look at this threads

Hope this helps you..

Regards,

Saleem

Former Member
0 Kudos
// Table cell editor is of type Input field
IWDInputField Input_Field_Adjust = (IWDInputField)view.createElement(IWDInputField.class,"Input_Field_Adjust"+i);
Input_field_Adjust.bindValue(attrib_Adjust);
Input_Field_Adjust.setOnEnter(wdThis.wdGetOnHitEntertAction());
tabColumn_Adjust.setTableCellEditor((IWDTableCellEditor)Input_Field_Adjust);

table_adjust =(IWDTable)view.getElement("AdjustTable" ); // get Table
table_adjust.addColumn(tabColumn_Adjust); //bind column

Edited by: Jean Carlo Abreu on Jul 6, 2009 12:24 PM

former_member187439
Active Participant
0 Kudos

You will have the line number displayed next to the error message "com.sap.tc.webdynpro.services.exceptions.WDIllegalArgumentException: Parameter col not found.

".

Could you check the line number and tell which line of code is that? That would be easy to find what is missing.