cancel
Showing results for 
Search instead for 
Did you mean: 

How to populate the table UI with data using webdynpro java?

0 Kudos

Hi Experts,

I have created a table UI at design time using webdynpro perspective in NWDS 7.5. A table got displayed with empty rows and columns.Although I kept the fields as 'Input fields', the cells are not editable....Please suggest me the way to populate data into the table..

Thanks in advance,

Aswini Yagati

Accepted Solutions (1)

Accepted Solutions (1)

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

did you bind some context to it ? Without that the table will just display always 3 empty rows as far as I remember.

Create a context node with some context elements under it and assign the created context node to the table control in its properties.

You can also do the other way round. Once you have the context, in the outline view from the rootelement container's context menu click on Apply Template, and select Table and assign the earlier created context. if a context element is specified as string then that table column will be able to be displayes as inputfield orbany other ui control that takes a string.

As for filling up your table with data, it is another story, I am sure there are a lot examples in the sap archive.

Cheers

Ervin

0 Kudos

Hi Ervin,

Thank you so much for the answer. My query is how to populate the data into the table i.e.,I got a table with un-editable cells.I tried the following code to get the editable table cells...

IPrivate<view name>.I<node_name>Node <name> = wdContext.node<node_name>(); //node initialisation IPrivate<view_name>.I<node_name>Element <element_name> =wdContext.create<node_name>Element(); //elementcreation

ArrayList <exe> = null;

int size = 0; //size == no. of rows we want

size = 30;

val = new ArrayList();

for(int i=0;i<=size-1;i++) {

<element_name> = wdContext.create<node_name>Element();

<exe>.add(<element_name>);

}

wdContext.node<node_name>().bind(<exe>);

Once again thank you for the help.

Regards,

Aswini

Answers (0)