Hello everyone and specifically UI peeps,
Just wanted to turn your attention to a couple of reusable UI components
that have been introduced along with the 3.3 Neutron integration
feature, and that might be of interest elsewhere.
The most interesting of them are link columns to be used within
EntityModelCellTable instances, that upon clicking enable one to "jump"
to a different UI context by selecting a different entity in the system
tree. I've attached a couple of screenshots that show how we've used it
to quickly navigate from the context of a network provider to that of
one of its imported networks.
This could be useful wherever one might want to move quickly to a main
tab context of an entity that is secondary in the current context. For
example, say I just moved a storage domain to maintenance and now I
would like to edit its properties - the domain name might be a good
candidate to link to that storage domain item in the system tree.
The usage is pretty straightforward, the recipe is as follows:
1. Add tree items that are potential targets to the map member in
SystemTreeModel (map works by ID).
2. Add LinkColumnWithTooltip to required table.
3. Set the column's FieldUpdater to set the selected item of
SystemTreeModelProvider according to the ID of the clicked EntityModel.
Examples can be found in the following patches:
http://gerrit.ovirt.org/#/c/15523/
http://gerrit.ovirt.org/#/c/15524/
A couple more components which might be useful:
* HorizontalSplitTable comprises two tables separated horizontally, to
be used in import/export situations.
* ListModelListBoxColumn to be used with EntityModelCellTable, contains
a list box that's linked to a ListModel.
* EditTextColumnWithTooltip to be used with EntityModelCellTable,
contains text that can be edited upon clicking.
All three can be observed by navigating to the Networks main tab and
clicking "Import", examples for usage may be found in
ImportNetworksModel and ImportNetworksPopupView.
Lior.