Sort
Sort Field and Direction
This defines the name of the CGI parameters which should be interpreted as providing server-side page requests. Different RIA frameworks use different defaults. For example, the ExtJS PagingBar widget uses sort
and dir
.
Whatever parameters are configured for these values (including defaults) you should make sure that your queries do not attempt to use CGI parameters with the same name in their fetch queries, otherwise you will find data being unexpectedly server-side sorted.
When the CGI parameter named by sort_field_param
is present, Jarvis will perform the following:
- Extract ALL records from the database query in the default query sort order.
- Use Perl
cmp
alphabetical sorting either ascending or descending. - Return the rows in the Perl-sorted order.
Note: The column named in the sort field parameter is case-sensitive and must match the exact column name returned by the <select>
query in the dataset definition.
Note: The Perl cmp
sorting may differ from the databases ORDER BY
sequencing.
Note: If sort_field_param
is present but sort_dir_param
is not, then sort order is ascending.
Note: The sort_dir_param
is based on the first letter of the value. A direction starting with a
or A
means ascending. A direction starting with d
or D
means descending.