getMetaStruct()
If you are passing a ColdFusion component to the the CFC_Component attribute, cf_sebForm will look for a "getMetaStruct" method in that component.
The getMetaStruct method should return a structure describing information about the component itself. It should have the following keys:
- arg_pk:
- cf_sebForm: default for the "pkfield" attribute
- cf_sebTable: default for the "pkfield" attribute
- arg_sort:
- cf_sebTable: default for the "CFC_SortListArg" attribute
- method_save:
- cf_sebForm: default for the "CFC_Method" attribute
- method_get:
- cf_sebForm: default for the "CFC_GetMethod" attribute
- method_gets:
- cf_sebTable: default for the "CFC_GetMethod" attribute
- method_delete:
- cf_sebForm: default for the "CFC_DeleteMethod" attribute
- cf_sebTable: default for the "CFC_DeleteMethod" attribute
- method_sort:
- cf_sebTable: default for the "CFC_SortMethod" attribute
- property_deletable:
- property_hidecols:
- catch_types:
- cf_sebForm: This will add values to the "CatchErrTypes" attribute.
This allows you to keep your cf_sebForm and cf_sebTable code very short.
For example, you could have code like the following:
<cf_sebForm CFC_Component="#Application.Employees#">
...
</cf_sebForm>
or:
<cf_sebTable CFC_Component="#Application.Employees#">
...
</cf_sebTable>
Taking advantage of global attributes and/or getFieldsstruct() could reduce the code even further.