Hello, I have two additional questions about sorting of lists of related objects in the edit-wizards. In the answer given below, nothing is said about the direction in which the list is sorted. Is there an attribute available to specify up or down, though?
And secondly, the example below works when you are sorting on an attribute in the relation-object, such as a posrel or a rolerel. But I couldn't get the sorting to work on a field in the related object, such as a title or a date. Is there no way to do that? Thanks in advance for any help, Bye, Sander Veenhof -----Original Message----- To: <[EMAIL PROTECTED]> Subject: RE: sorting lists in editwizards From: "Henk Hangyi" <[EMAIL PROTECTED]> Date: Mon, 12 May 2003 17:43:39 +0200 Importance: Normal In-Reply-To: <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Sender: [EMAIL PROTECTED] -------------------------------------------------------------------------------- Hi, ordertype="number" ? See the wizards for paragraphs below. Regards, Henk. <?xml version="1.0"?> <!DOCTYPE list PUBLIC "-//MMBase/DTD editwizard 1.0//EN" "http://www.mmbase.org/dtd/wizard-schema_1_0.dtd"> <list role="posrel" destination="paragraph" minoccurs="0" maxoccurs="*" orderby="[EMAIL PROTECTED]'pos']" ordertype="number"> <title>Paragrafen</title> <item> <title>Paragrafen</title> <field fdatapath="[EMAIL PROTECTED]'pos']" ftype="line"><prompt>Positie</prompt></field> <field name="title" ftype="line" dtminlength="0"><prompt>Paragraaf titel </prompt></field> <field name="body" rows="10" dtminlength="0"><prompt>Paragraaf tekst</prompt></field> <list include="wizards/images/add_images_posrel_position.xml" /> <list include="wizards/urls/add_urls_posrel_small.xml" /> <list include="wizards/people/add_people_posrel.xml" /> <list include="wizards/videofragments/add_videofragments_posrel.xml" /> </item> <command name="search" nodepath="paragraph" fields="title" orderby="number" directions="down" age="31"> <prompt>Zoek paragraaf op titel</prompt> <search-filter> <name>Titel bevat</name> <search-fields>title</search-fields> </search-filter> </command> <command name="insert"/> <action type="create"> <relation role="posrel"> <object type="paragraph" /> <field name="pos">{sum(//[EMAIL PROTECTED]'posrel' and @lastitem='true']/[EMAIL PROTECTED]'pos'])+{$pos}}</field > </relation> </action> </list> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ernst Bunders Sent: Monday, May 12, 2003 5:39 PM To: '[EMAIL PROTECTED]' Subject: RE: sorting lists in editwizards i'm one step ahead: now i can sort my list on a field, but the value on which is want to sort is of int type, and the wizard sorts on a string (converting the int). the result is: 1, 10, 11, 12, 2, 3 any idears, anybody? Ernst -----Oorspronkelijk bericht----- Van: Ernst Bunders Verzonden: maandag 12 mei 2003 16:38 Aan: '[EMAIL PROTECTED]' Onderwerp: sorting lists in editwizards hello can anybody tell me if and how i can sort my lists in a editwizard? It is unclear to me, and the documentation doesn't mention it... thanks
