cancel
Showing results for 
Search instead for 
Did you mean: 

Updating table dynamically

Former Member
0 Kudos

Hi Experts

I have a table in my webdynpro application and i had binded a node to that table i need to display the string values that are generated from database should be displayed in the table

can you please give me the code to update the table dynamically with the sting vaules its very urgent

Regards

Noel

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Noel,

If you are using a model class in your webdyn pro and any model class's method which returns a list of values from database table, you might have binded that model node to component node.

Hence executing that method will return a list of values. If you bind that node as table's data source, then you dont need any code to include those retrieved values from database table into you webdyn pro ui table.

OR

if you are using seperate node in a view and want to assign values of that node, which holds list of values you can use followin code.

IPrivate<i>ViewName</i>.I<i>NodeElement</i> ele=null;

for(int i=0; i<wdContext.node<i>ResultNode</i>().size(); i++){

ele = wdContext.create<i>NodeElement</i>();

ele.set<i>NodeAttribbute</i>(wdContext.node<i>ResultNode</i>().get<i>ResultNode</i>ElementAt(i).get<i>AttributeName</i>());

// you can set more values to attribute of the node, if there are many attributes to a node

wdContext.node<i>Node</i>().addElement(ele);

}

I assume you will uderstand what is node and its attributes.

Hope this helps.

sudhir.

Former Member
0 Kudos

Maybe you should use node with supplyfunction ?

Former Member
0 Kudos

Hi Deepak,

you can update the local table of that type with string and then bind this table to node.

code looks like.

loop at lt_string to ls_string.

ls_ctx_sp_data-short_text = ls_string-data.

APPEND ls_ctx_sp_data TO lt_ctx_sp_data.

endloop.

lo_nd_ctx_sp_data->bind_table( lt_ctx_sp_data ).

you can write this code to some event or do_modify method or at time control

let me know if it doesn't answer.

Regads

Manish

Message was edited by:

Armin Reichert

Former Member
0 Kudos

HI Noel

If You dont want any user actions to update your table. you can use a TIMED TRIGGER and set delay property and write your retrieval code in the action of delay property

Regards

Chaitanya.A