• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Ordering of Nodes with List

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a list of records. I am trying to attempt to write to write a sort of the children.NodeBuilder to fill it with one top level element and then have my nodes serve as reacords. In other words, my list what is below. It seems in the closure it only compares the 1st 2 kids in Qualification and Offer List and doesn't incorporate Identity List into the equation


<Transaction>
<Qualification>
<OfferList/>
<IdentityList/>
</Transaction>

I am trying to get the sort to look like.


<Transaction>
<IdentityList/>
<Qualification>
<OfferList/>

</Transaction>


When I run the following.

allRecords.each{
it.children().sort{it}

}

I am getting a totally different layout that apears like this.

<Transaction>
<OfferList/>
<Qualification>
<IdentityList/>

</Transaction>
 
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic