Ferreteria/errors/need to define ListItem Value: Difference between revisions
< Ferreteria | errors
Jump to navigation
Jump to search
(note about whether you need a Table) |
m (Woozle moved page User:Woozle/Ferreteria/errors/need to define ListItem Value to Ferreteria/errors/need to define ListItem Value: is finished enough) |
(No difference)
|
Revision as of 00:17, 27 January 2017
Error text: need to define method "ListItem_Value()" for class clsDataSet, or create a descendant.
Dropdown lists in Ferreteria forms require three callbacks so that they know what the recordset should display:
- ListItem_Value() - native value (typically an integer, but can be anything that could be used as a key)
- ListItem_Text() - plaintext value to display
- ListItem_Link() - formatted text to display when possible (usually when control is not in edit mode; typically a link)
Whichever object is passed to the fcFormControl_HTML_DropDown::Records() method needs to define these methods. If you're using a generic recordset class (such as DataSet), just create a descendant of that class only* and implement these methods.
- *While the callback does not require a matching Table class, the practical logistics of getting the information you need to return may require it. Creating an admin link, for example, is just easier if you can re-use an existing Table class.