Ticket #393 (closed enhancement: fixed)

Opened 17 months ago

Last modified 17 months ago

Add widgets to workspace

Reported by: pmartin Owned by: adube
Priority: major Milestone: 1.2.0
Component: server Version: trunk
Keywords: bis-1.2.0 Cc:

Description (last modified by adube) (diff)

Currently

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.

Historical facts

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.

Proposed fix

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.

Attachments

demo.png Download (0.6 MB) - added by adube 17 months ago.
What the actual demo looks like

Change History

  Changed 17 months ago by adube

  • keywords bis-1.2.0 added
  • description modified (diff)

  Changed 17 months ago by adube

Currently, in GeoPrisma, there is not quick way to know what widgets don't need to be linked to resources. The only way is to look at the widget "getMandatoryResourceOptionList" method in the .php file : if it returns NULL or isn't set, then it doesn't need to be linked to resources.

For the user point of view, it'll become annoying. We'll have to leave this list somewhere (in the doc or in a config in comments).

  Changed 17 months ago by adube

Widgets not linked to resources

Will be supported

  • filetreepanel
  • geoextprintform
  • geoexttoolbar
  • geoextux/geonamessearchcombo
  • geoextux/layertreebuilder
  • geoextux/printpreview
  • geoextux/redliningpanel
  • geoextux/shortcutcombo
  • geoextux/wmsbrowser
  • geoextux/zoomto
  • getmouseposition
  • htwindow
  • keepactivesession
  • measuretool
  • mouseposition
  • scale
  • toggle
  • unselectall
  • vectorlayer
  • zoomslider

Will not be supported

  • mappanel
  • pdfprint (soon to be deprecated)
  • map (deprecated)
  • mapfishlayertree (deprecated)
  • mapfishrecenter (deprecated)

  Changed 17 months ago by adube

  • status changed from new to closed
  • resolution set to fixed

Fixed in r1278.

A new sample was added in the "Config" section demonstrating that new feature.

follow-up: ↓ 6   Changed 17 months ago by adube

  Changed 17 months ago by adube

In fact, the sample is very well detailed with all different workspaces you can pick, but because of #179 the footer isn't included.

  Changed 17 months ago by adube

See the attached screenshot : it's what the demo actually looks like. There are links you can use to demonstrate the inclusion of specific widgets.

Changed 17 months ago by adube

What the actual demo looks like

Note: See TracTickets for help on using tickets.