Re: veogen list count / sorting

From: Chuck Hill (chil..lobal-village.net)
Date: Sat Jul 12 2008 - 10:27:59 EDT

  • Next message: Mike Schrag: "Re: veogen list count / sorting"

    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 - 10:28:57 EDT