Index: doc/customizing.txt =================================================================== RCS file: /cvsroot/roundup/roundup/doc/customizing.txt,v retrieving revision 1.187 diff --unified -r1.187 customizing.txt --- doc/customizing.txt 13 Jan 2006 01:47:07 -0000 1.187 +++ doc/customizing.txt 16 Jan 2006 10:23:30 -0000 @@ -352,8 +352,10 @@ The "classic" schema -------------------- -The "classic" schema looks like this (see below for the meaning -of ``'setkey'``):: +The "classic" schema looks like this (see section `setkey(property)`_ +below for the meaning of ``'setkey'`` -- you may also want to look into +the sections `setlabelprop(property)`_ and `setorderprop(property)`_ for +specifying (default) labelling and ordering of classes.):: pri = Class(db, "priority", name=String(), order=String()) pri.setkey("name") @@ -548,12 +550,37 @@ Note, the same thing can be done in the web and e-mail interfaces. -If a class does not have an "order" property, the key is also used to -sort instances of the class when it is rendered in the user interface. -(If a class has no "order" property, sorting is by the labelproperty of -the class. This is computed, in order of precedence, as the key, the -"name", the "title", or the first property alphabetically.) +setlabelprop(property) +~~~~~~~~~~~~~~~~~~~~~~ + +Select a property of the class to be the label property. The label +property is used whereever an item should be uniquely identified, e.g., +when displaying a link to an item. If setlabelprop is not specified for +a class, the following values are tried for the label: + + * the key of the class (see the `setkey(property)`_ section above) + * the "name" property + * the "title" property + * the first property from the sorted property name list + +So in most cases you can get away without specifying setlabelprop +explicitly. + +setorderprop(property) +~~~~~~~~~~~~~~~~~~~~~~ + +Select a property of the class to be the order property. The order +property is used whenever using a default sort order for the class, +e.g., when grouping or sorting class A by a link to class B in the user +interface, the order property of class B is used for sorting. If +setorderprop is not specified for a class, the following values are tried +for the order property: + + * the property named "order" + * the label property (see `setlabelprop(property)`_ above) +So in most cases you can get away without specifying setorderprop +explicitly. create(information) ~~~~~~~~~~~~~~~~~~~