Projects:NewCombos/Technical Specs
Contents |
Introduction
The goal of this project is to refactor current implementation for Table and TableDir references. Currently they are evaluated by FormInitializationComponent (FIC) generating a JSON object containing all the records. The goal is to associate them with datasources so:
- They are populated only when drop down is opened
- The can be paginated in case of high volume
All these changes should be transparent in order to do an effective deployment. Existent references should not require of any change. Current references are implemented by ComboTableData (CTD) class. This implementation needs to be revisited to check whether it is possible to optimize perfomance. Currently they are implemented using SQL (XSQL), in order not to change definition it is required to continue using it.
CTD instances are cached in ApplicationDictionaryCachedStructures (ADCS) which is used by FIC. This chaching needs also to be revisited:
- Is it still required to be cached?
- FIC will not longer generate the whole set of records for these references, but it will continue using them to calculate defaults as well as in callouts.
Datasource
A new datasource implementation will be created. It will be in charge of getting values when to populate these drop downs:
Considerations:
- It needs to be paginated (default page size for selectors is currently fixed to 75 records). We can use new scrollable XSQL to better perform (to be checked)
- It needs to provide filtering capability
- It should also take care of security:
- A drop down is always opened in a context of a standard/parameter window, datasource should receive information of the context it is opened from, and only retrieve values in case current role has access to this context
- Additional where clauses and validations should not be passed as parameter but obtained in backed from AD definition
- It should take care of validations, currently validations are always SQL based
- It should be translatable
Security
As this new datasource is generic and can be accessed through URL, it is required it to take care of security in order to prevent accessing data to roles without granted permissions.
Callouts
Callouts are executed by FIC. Currently callouts interact with combos in 2 different ways:
- Setting a value. This should continue working in the same way it currently does, similarly to selectors.
- Restrict the available values. A callout can set the whole list of values for a combo. In this case, in order to maintain backwards compatibility, when in this case the UI should notice it not to request data to datasource but to use existent set of data returned by FIC.
Validations
Validations are implemented as callouts (ComboReloads) in generated 2.50 windows. Validations now, should be applied to datasource when it is opened. Note that organization field has always a explicit datasource. Validations should not be managed as callouts, they should be computed by the datasource.
FIC can continue computing validations to retrieve first value.