Re: Modeler Attribute Order Question.

From: Mike Kienenberger (mkienen..mail.com)
Date: Wed Oct 26 2005 - 17:58:14 EDT

  • Next message: Andrus Adamchik: "Re: Modeler Attribute Order Question."

    First off, I understand your situation because I frequently generate
    UI files from my Cayenne models.

    However, I don't think it's likely that you're going to see the
    ability to custom-order attributes in the modeler as it's outside of
    Cayenne's core functionality to generate UI files from the data model.

    However, if you're using Cayenne 1.2, the cgen task (when set to
    version=1.2) gives you a great deal of flexibility. You can create a
    new velocity tool that you can inject into your template that can sort
    your attributes and relationships. I'd recommend that such a tool
    read the ordering from a configuration file. That way you can easily
    control the ordering on a per-entity level.

    If you decide to create such a tool, consider posting it back here.
    I'd probably use it, and depending on how it's implemented, it might
    even get committed into the cgen package as a default velocity tool.

    -Mike

    On 10/26/05, Ahmed Mohombe <amohomb..ahoo.com> wrote:
    > Hi,
    >
    > Is it possible to control somehow the order of the fields/attributes displayed(and saved)
    > in Attribute table for Object Entities?
    >
    > After a reverse engineering this order doesn't seem to be the same like one from the DB Entities
    > Attributes (and this seems to be the same like in the DB - very good).
    >
    > At the moment I can see no 'move up' and 'move down' button for such an operation in the Modeler(if
    > at least the order from the DB was not followed).
    >
    > This functionality would be very important, since the order from that Object Entities Attributes is
    > used for every generation (e.g. for the POJO fields).
    > This is more evident for custom generation:
    > e.g. for a UI, the order would be very important: it's not the same if the "description" is before
    > the "name" or after it.
    >
    > This 'randomness' makes at the moment 'unusable' the custom UI generation from the Cayenne Modeler.
    >
    > Thanks in advance,
    >
    > Ahmed.
    > P.S. I can see this behavior with M6 too.
    >
    >



    This archive was generated by hypermail 2.0.0 : Wed Oct 26 2005 - 17:58:16 EDT