Re: veogen list count / sorting

From: Mike Schrag (mschra..dimension.com)
Date: Sat Jul 12 2008 - 16:10:47 EDT

  • Next message: Lachlan Deck: "Re: veogen list count / sorting"

    What Chuck said + sorter is not bound in veogen, I don't think, and
    pkAttributes returns a Set not a List, so the lists. stuff won't work.

    ms

    On Jul 12, 2008, at 10:27 AM, Chuck Hill wrote:

    >
    > On Jul 12, 2008, at 4:28 AM, Lachlan Deck wrote:
    >
    >> Hi there,
    >>
    >> Any reason why these don't work?
    >>
    >> ${entity.primaryKeyAttributes.count}
    >> ${entity.primaryKeyAttributes.size}
    >> $lists.size(${entity.primaryKeyAttributes})
    >>
    >> #foreach($obj in $sorter.sort(${entity.primaryKeyAttributes},
    >> "name"))
    >> ...
    >> #end
    >
    >
    > I think it might have to do with how Velocity resolves the key
    > path. I have had to add parens for things like:
    > ${entity.name.toUpperCase()}
    >
    > Maybe try
    > ${entity.primaryKeyAttributes.count()}
    >
    >
    > Chuck
    >
    >
    > --
    >
    > Practical WebObjects - for developers who want to increase their
    > overall knowledge of WebObjects or who are trying to solve specific
    > problems.
    > http://www.global-village.net/products/practical_webobjects
    >
    >
    >
    >
    >



    This archive was generated by hypermail 2.0.0 : Sat Jul 12 2008 - 16:11:49 EDT