| 36 | }}} |
| 37 | Next, add your model to the $uses array, in the same fashion as the components above: |
| 38 | var $uses = array('EvaluationRubric', |
| 39 | |
| 40 | Next, create the following functions in the controller: |
| 41 | {{{ |
| 42 | // Sets up the data for the ajax list |
| 43 | function setUpAjaxList () { |
| 44 | |
| 45 | // Which columns to list, and include data from. |
| 46 | $columns = array(); |
| 47 | // The available actions for each column |
| 48 | $actions = array(); |
| 49 | // Any extra filtering to perform on the data from the database. |
| 50 | $extraFilters = ""; |
| 51 | // Any tables to join in, and any extra filters to implement on those tables |
| 52 | $joinTables = ""; |
| 53 | // Whether to fetch associated data or not ( (-1) means not at all ). |
| 54 | $recursive = (-1); |
| 55 | |
| 56 | $this->AjaxList->setUp($this->, $columns, $actions, |
| 57 | "Group.group_num", "Group.group_name", |
| 58 | $joinTables, $extraFilters, $recursive, "postProcess"); |
| 59 | } |
| 60 | }}} |
| 61 | |
| 62 | |