on 02-03-2009 7:56 PM
HI all,
I am getting certain values from R/3 using adaptive rfc model and displaying those values in a table.But if add a new record in the database i should get that record as a first record in the top in my table which am getting as a last record now.Can anyone suggest me regarding this.
Thanks in advance
Anusha
Hi,
Let's say the node in question is called "Test". After adding the new record to the node simply do this:
wdContext.nodeTest().moveElement(wdContext.nodeTest().size() - 1, 0);
The WD runtime will take care of the shuffling.
@Sanyev
The "move" APIs only move the lead selection around. They don't move actual elements.
Regards,
Satyajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi sanjay,
Will it replace the 1st record with the new record.
or else insert the new record and arrange the records.
What i am saying is if i have 8 records.
WIll it replace the 1st record and keep the same 8 records.
The solution for this anusha is as suggested by sanjay.
Insert the 1st element by specifying the index.
Then run the loop for the remaining elements from the next index.
Mean to say if ur inserting elemnt in 1 .
and run the loop(i.e.for(i=1;i<x;i++).
Thanks & regards,
Lokesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anusha,
Generally in Webdynpro context if you create a new element it will go to the end of the list. If you want to make it the first element then after creation of the new element when you add it to the node use the api
addElement(int index, IWDNodeElement element) on the desired node and set the index to be one.
You can also use the moveElement(int from, int to) api to move the element to the first position.
if the creation happens in the backend then this can be done in the backend r3 system also.
Regards,
Sanyev
Edited by: Sanyev Babu on Feb 4, 2009 1:16 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.