Ticket #393 (closed enhancement: fixed)
Add widgets to workspace
|Reported by:||pmartin||Owned by:||adube|
Description (last modified by adube) (diff)
When using the XMLWorkspaceConfig, widgets that do not need to be linked to resources are always added to the UI. This is not always wanted.
We used to link all widgets to resources, regardless if that was useful or not, thus was a mean to control what we wanted or not.
This was really annoying because you needed to be sure that the resource linking them were always added (ACL read rights) otherwise the widgets were excluded. This was the case for widgets such as the toolbar, zoomslider, measuretools, etc.
An other way to include them was to have a dummy resource for that, but that was really annoying too.
This behavior disappeared when widgets received their "getMandatoryResourceOptionList" method. When it returns NULL, the widget doesn't need to be linked to resources, thus you no longer need to do so in the config. The only drawback is that from that moment on, they were always added to the UI.
The XMLConfig driver doesn't need to be fixed.
For the XMLWorkspaceConfig driver, we could have a 'widgets' tag added to the workspace. When set, it defines the list of widgets to include. Only the widgets that don't need to be linked to resources would be added that way since those that required to do so are already listed in the resources.
When not set, add all widgets (as currently being done). This would stay the default behavior.