That's kind of what I figured. Thanks for the code. I'll look through it. Chas.
David Pollak wrote: > I think you're going to have to do this one manually. Attached, please > find some less than efficient code. > > On Thu, Nov 13, 2008 at 10:30 AM, Charles F. Munat <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > > If I have an entity thus: > > @Entity > class Category { > var name : String = "" > } > > and another: > > @Entity > class Example { > var name : String = "" > > var exampleType : String = "" > > @ManyToOne > var parent : Category = new Category() > } > > And this data: > > Category > A > B > C > > Example > black type: 2 category: A > red type: 1 category: B > orange type: 1 category: A > yellow type: 2 category: A > green type: 1 category: C > blue type: 2 category: C > violet type: 2 category: A > white type: 1 category: B > > How do I get this output in Lift: > > <ol> > <li>Category A > <ol> > <li>Type 1 > <ol> > <li>orange</li> > </ol> > </li> > <li>Type 2 > <ol> > <li>black</li> > <li>violet</li> > <li>yellow</li> > </ol> > </li> > </ol> > </li> > <li>Category B > <ol> > <li>Type 1 > <ol> > <li>red</li> > <li>white</li> > </ol> > </li> > </ol> > <li>Category C > <ol> > <li>Type 1 > <ol> > <li>green</li> > </ol> > </li> > <li>Type 2 > <ol> > <li>blue</li> > </ol> > </li> > </ol> > </li> > </ol> > > Which would look like this: > > 1. Category A > 1. Type 1 > 1. orange > 2. Type 2 > 1. black > 2. yellow > 3. violet > 2. Category B > 1. Type 1 > 1. red > 2. white > 3. Category C > 1. Type 1 > 1. green > 2. Type 2 > 1. blue > > > Can this be done with bind? Choose template? Or do I have to build it in > the method using a NodeSeq and just output that? > > Thanks, > > Chas. > > > > > > > -- > Lift, the simply functional web framework http://liftweb.net > Collaborative Task Management http://much4.us > Follow me: http://twitter.com/dpp > Git some: http://github.com/dpp > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
