Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#393 closed enhancement (fixed)

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)

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 (1)

demo.png (576.5 KB ) - added by adube 12 years ago.
What the actual demo looks like

Download all attachments as: .zip

Change History (9)

comment:1 by adube, 12 years ago

Description: modified (diff)
Keywords: bis-1.2.0 added

comment:2 by adube, 12 years ago

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).

comment:3 by adube, 12 years ago

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)

comment:4 by adube, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r1278.

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

comment:7 by adube, 12 years ago

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

comment:8 by adube, 12 years ago

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.

by adube, 12 years ago

Attachment: demo.png added

What the actual demo looks like

Note: See TracTickets for help on using tickets.