cancel
Showing results for 
Search instead for 
Did you mean: 

Create a Table Dynamically in WEB Dynpro Java with diferent type of column

Former Member
0 Kudos

Hi everyone, I have a question if is possible to create a table dynamically in Web Dynpro Java?, depending of the RFC consults create the rows dynamically, ,this table must have diferent type of columns, for example link column (when the user click this link execute an action and show a adobe interactive form in another view), image column (show an image depending of the information)

Thank you everyone

Atte Israel

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,Israel.

Yes , it is possible through dynamic programming in wdModify of the View.

You can do this ,for example, using cell variants.

	
IWDTable tab = (IWDTable) view.getElement("TABLE_NAME");			
IWDTableStandardCell cellV= (IWDTableStandardCell) view.createElement(IWDTableStandardCell.class,"TableStandardCell"+i);  
cellV.setVariantKey("NotEditableVariant");
cellV.setCellDesign((WDTableCellDesign)wdContext.nodeTableDaysTitle().currentTableDaysTitleElement().getAttributeValue("CellDesign"+i));
IWDTextView textViewi= (IWDTextView) view.createElement(IWDTextView.class,"TextView"+i);  // -- here you control the type of the object that is displayed in the cell
textViewi.bindText(dayAttrib);
cellV.setEditor(textViewi);		
tabColumn.addCellVariant(cellV);
tab.addGroupedColumn(tabColumn,tab.numberOfGroupedColumns());	

Using this code you can control even specific cells in the table and not only columns.

Hope this helps you,

Constantine

Former Member
0 Kudos

Hi Constantine Reif , thank you very much for the help, I have just solved this problem, but I have another question, one column of the table is linktoaction type,It shows an image, and the user have to click that image to execute an action,my problem is how to pass a value to execute that action, that value depends of the row where the user click the image

beforehand thank you

Atte Israel

Former Member
0 Kudos

Hello,

You need to perform parameter mapping in order to identify the clicked row.

Look at -

[http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/c092333b-0601-0010-e7af-8c227fb6d052]

[http://help.sap.com/saphelp_nw70/helpdata/en/60/1f1f056f057d4d962375efd3c92ed0/content.htm]

Constantine