patForms RFC #0001: Context aware datasources ============================================= $Id: rfc0001.txt 269 2005-07-31 11:27:00Z schst $ Author : schst Created : 2005-06-14 Status : Implemented in changeset [268] Implemented : 2005-07-31 Scope of change --------------- Datasources, which act as data providers like the Enum element should be aware of the context they are used in. This way they can be more than arrays that are created on demand. Rationale --------- * Language dependent Enum values * Values depend on other attributes of the element Functionality ------------- * The elements that support datasources need to pass the element itself as the sole argument to the getValues() method or the datasource callback. This influences the following elements * Enum * Set * Combobox * RadioGroup * patForms could also provide a createDatasource() method. In order to achieve this, we should standardize the API of the datasources that ship with patForms. The easiest way probably would be passing an array to the constructor, like the Propel Datasource already does. Security considerations ----------------------- * datasource may access and modify the elements Speed impact ------------ None. Dependencies ------------ This will at least break the existing examples. Up to now, the name of the element has been passed to the datasource, if the datasource was a callback and not a datasource object. This functionality is not documented anywhere and not used consistently in patForms, so a change would probably be a good idea. Related documents ----------------- None. Comments -------- None yet. History ------- $Log$ Revision 1.1 2005/06/14 16:12:51 schst started the RFC