Ferreteria/errors/need to define ListItem Value: Difference between revisions
< Ferreteria | errors
Jump to navigation
Jump to search
(Created page with "'''Error text''': need to define method "ListItem_Value()" for class clsDataSet, or create a descendant. Dropdown lists in Ferreteria {{l/ferreteria/|pieces/forms|forms}} req...") |
(note about whether you need a Table) |
||
Line 6: | Line 6: | ||
* '''ListItem_Link()''' - formatted text to display when possible (usually when control is not in edit mode; typically a link) | * '''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 | 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. |
Revision as of 15:18, 19 July 2015
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.