You are not logged in Log in Join
You are here: Home » Members » hargikas » A minimal product for ordering any list » How to use an Ordered List

Log in
Name

Password

 

How to use an Ordered List

This is a manual for the basic Ordered list. You can have the advanced Ordered List functionality that works like the old one.

Methods

In this management screen you can create your methods. The can be any function (DTML, Python Script, ZSQL, external).

There are 2 functions you need to make to list and order correctly. The function are refered by the next properties:

  • default_list_function: This method returns the objects to be inserted in the unordered list.
  • default_display_function: If the objects returned by the list function are complicated enough, this function is called to render each object for the multiple selection forms. This function uses the variable with the name "display_variable" value
The paramereters of each function depending on the type are:
  • DTML: Standard, you cann't specify any parameters
  • ZSQL: The only parameter passed corrctly is the variable named contained in the display_variable property
  • Python, External: You can have as a parameter on of these: (REQUEST, **kw), (REQUEST), None
Because the ZSQL methods return a specific type of result. You can optionally map this result to a normal list, by specifying the mapping field in the sql_returned_mapping_field property.

Manage Properties

  • title: :-)
  • default_list_function: This Property points on your list function.
  • default_display_function: This Property points on your display function
  • display_variable: This name will be used in the display function to render each object
  • sql_returned_mapping_field: If specified, maps the results of a ZSQL method by this field

How to order your list

You can manipulate the order list by these buttons:

  • >> Move all objects from unordered to ordered list
  • > Move selected objects from unorder list to ordered list
  • < Move selected objects from order list to unordered list
  • << Move all objects from ordered to unordered list
  • //\\ Move selected objects from ordered list to the first places
  • /\ Move selected objects from ordered list one place higher
  • \/ Move selected objects from ordered list one place lower
  • \\// Move selected objects from ordered list to the last places

The results of this ZClass are returned through the getList(check=0) method. If you the parameter check is true (1) then it will execute again the list method for to be consistent. By default it doesn't check and it is faster!