Opened 12 years ago
Closed 12 years ago
#1092 closed defect (fixed)
tabsearch with geoext print provider panel activated in map tab (#1049) causes js errors
Reported by: | simonp | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | v2.8.0 RC2 |
Component: | General | Version: | v2.8.0RC1 |
Keywords: | Cc: |
Description
geoext print provider uses a store loaded from mapfish servlet to hold print capabilities but code in MapApp.js doesn't wait for store to load so generates js errors when it tries to use the empty store.
A fix is to move widgets etc that use or are based on print capabilities into the loadcapabilities event handler of the geoext print provider - that way they will only be created etc when the store has been filled with info from the ajax call to the mapfish servlet.
Change History (2)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
I think Francois has rather cleverly 'fixed' this by delaying the call to getViewport in App.js (see the map tab setup around line 924) until the tab is actually activated! I'm not sure it is the safest fix (being pedantic now :-)) but it does seem to work.
I just committed an alternative to my repo that uses loadcapabilities (it's just a refactor of MapApp.js). You can see it at https://github.com/sppigot/core-geonetwork/commit/bc3fe26005a5395f7a326882a9ace48488ec7738