Ferreteria/errors/need to define ListItem Value: Difference between revisions

From Woozle Writes Code
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...")
 
m (3 revisions imported: moving this project here)
 
(2 intermediate revisions by one other user not shown)
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 (no need to create a matching Table class) and implement these methods.
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.

Latest revision as of 16:42, 22 May 2022

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.