Lookup Manager
The lookup manager is a handy utility used to manage a set of tables and their relationships. In order to make it work, the object's decorator must contain the following methods:
Required Methods
- get/set TableConfig : To get and set the table of configuration data, saved as instance.tableConfig
- validate():Array : Method to know if the object' has been populated accordingly.
- configure : To configure the table config.
Table Configuration Data
The table config structure contains some extra metadata on how to render the table in the lookup manager.
| KEY | Required | Description |
| SortBY | TRUE | The column to sort on by default |
| {column}.html | FALSE | The html element to use. For boolean types use: radio or select (default). For other types (string,date,UUID,GUID) use: text (default), password, textarea, richtext (if implemented) |
| {column}.display | FALSE (Default:true) | Whether to display the column or not, use: true or false |
| {column}.validate | FALSE | The type of validation to do according to the validation JS library. Default is no validation. |
| {column}.maxlength | FALSE | The max length of the field in the database. |
| {column}.helptext | FALSE | The help text to show on the form |
| {m2o relation name}.displayColumn | TRUE | If the object has a m2o relation, then choose the column to use in the select box |
Validations
The valid masks are
- domain
- phone
- zip
- numeric
- image (gif,jpg,bmp,png,jpeg)
- media (avi,mov,mpeg,wmv)
