[GeoNetwork-devel] [GeoNetwork opensource Developer website] #1092: tabsearch with geoext print provider panel activated in map tab (#1049) causes js errors

#1092: tabsearch with geoext print provider panel activated in map tab (#1049)
causes js errors
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------
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.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1092&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1092: tabsearch with geoext print provider panel activated in map tab (#1049)
causes js errors
---------------------+------------------------------------------------------
Reporter: simonp | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Keywords: |
---------------------+------------------------------------------------------

Comment(by simonp):

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

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1092#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#1092: tabsearch with geoext print provider panel activated in map tab (#1049)
causes js errors
----------------------+-----------------------------------------------------
  Reporter: simonp | Owner: geonetwork-devel@…
      Type: defect | Status: closed
  Priority: major | Milestone: v2.8.0 RC2
Component: General | Version: v2.8.0RC1
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by simonp):

  * status: new => closed
  * resolution: => fixed

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/1092#comment:2&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.