Skip to Content
0
Former Member
Jul 06, 2009 at 09:46 AM

Parameter mapping error in webdynpro java

43 Views

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