cancel
Showing results for 
Search instead for 
Did you mean: 

simple question changing index on the contex node

Former Member
0 Kudos

I got a collection of nodes. I'm parsing the elements in a loop like this:

for(int i=0;i<wdContext.nodePersons().size();i++) {

elmt = wdContext.nodePersons().getPersonsElementAt(i);

if(elmt.getPersonID().equals(ID)) {

If the IF statement is true, i want that element to be put at det first index. Can someone please helpe me out fixing this?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos
wdContext.nodePersons().moveElement(i, 0);

Armin

Answers (0)