Rapid Database Application Development
"Microsoft Access for Linux"
Lookup Column Wizard : Design Documentation
Creation date: 2004-12-08 Docs maintained by: jstaniek
Lookup Column Wizard allows you to add a database relation for a single column. Basically, once such relation is defined (one-to-many), it allows user to select one of many values for a given field using some sort of combo box. The task is to deliver intelligent GUI for this wizard. This task doesn't include a code for creation the column itself.
WELCOME. Select lookup type
There are two ways of defining "many" side of this relation:
The 1st way is more generic, and allows to reuse once defined data schemas.
Sequence Diagram WELCOME:SelectLookupType -> (way1)-> TableOrQueryDataSource -> FieldsSelection -> SortOrder -> ColWidth -> SelectBindingColumn -> EnterColumnName ->END (way2)->EnteringDataByHand -> SelectBindingColumn (like above) -> EnterColumnName (like above) ->END
Pages for way1^ toc
Type Name ---- ---- Table [icon]Table1 Table [icon]Table2 Query [icon]Query1
2nd column contains an icon ("table" or "query").
Inerit from KActionSelector class here to implement KexiFieldSelectionWidget class.
Note: this widget will be reused later in other Kexi areas.
Do not implement this page as you can see on the shot below. Use KexiTableView widget together with not-db-aware KexiTableViewData. See formeditor/connectiondialog.cpp or plugins/tables/kexialtertabledialog.cpp for example usage. Following columns should be visible:
Field Sorting ----- -------
__Field column shouldn't be editable.
Sorting column should be a combo box (just like field type combo in kexialtertabledialog), having three possible items: "No sorting" (the default), "Ascending" and "Descending".
The tableview shouldn't allow insertions.
Like for SortOrder page, use here KexiTableView widget together with KexiTableViewData. But this time, the table view is db-aware -- should be filled with data from a table or query selected on TableOrQueryDataSource page.
The tableview shouldn't allow data editing and insertions - only setting column width.
RULE: Skip this page if either:
Note: currently we're not supporting bindings using more than one fields at a time.
Pages for way2^ toc
identical as the one for way1 (see SelectBindingColumn screenshot and it's notes)^ toc
identical as the one for way1 (see EnterColumnName screenshot and it's notes)^ toc
Implementation Notes^ toc
Related tasks^ toc