Ticket #862 (closed enhancement: fixed)

Opened 14 months ago

Last modified 13 months ago

Widgets / Restore search state

Reported by: fxp Owned by: geonetwork-devel@…
Priority: major Milestone: v2.7.0
Component: General Version:
Keywords: Cc:

Description

Currently only some URL parameters (eg. any=corine) could be used to populate the search form on application startup. Instead of that, it's better to make the search form stateful and use Ext.state.Provider to be able to restore the state of the application.

In order to be able to restore search state create a SearchFormPanel widget.

State must be saved:

  • on search
  • on reset

State consists of saving:

  • all search form fields values (including spatial filter)
  • search status (triggered or not)

This state could be use with a GeoExt permalink provider to display current search permalink:

            // set a permalink provider
            permalinkProvider = new GeoExt.state.PermalinkProvider({encodeType: false});
            Ext.state.Manager.setProvider(permalinkProvider);
            // update link when state chnages
            var onStatechange = function(provider) {
                var l = provider.getLink();
                Ext.get("permalink").update("<a href=" + l + ">" + l + "</a>");
            };
            permalinkProvider.on({statechange: onStatechange});
            

Attachments

geonetwork-permalink.png Download (36.9 KB) - added by fxp 13 months ago.
862.patch Download (49.3 KB) - added by fxp 13 months ago.

Change History

Changed 13 months ago by fxp

Changed 13 months ago by fxp

Changed 13 months ago by fxp

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

Committed revision 9092. Committed revision 9093.

Note: See TracTickets for help on using tickets.