on 10-23-2007 11:50 AM
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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Maybe you should use node with supplyfunction ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.