Opened 13 years ago

Closed 13 years ago

#862 closed enhancement (fixed)

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

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

Download all attachments as: .zip

Change History (3)

by fxp, 13 years ago

Attachment: geonetwork-permalink.png added

by fxp, 13 years ago

Attachment: 862.patch added

comment:1 by fxp, 13 years ago

Resolution: fixed
Status: newclosed

Committed revision 9092. Committed revision 9093.

Note: See TracTickets for help on using tickets.