Skip to content

Commit

Permalink
#511 GetCurrentMDTab service should retrieve the default view from th…
Browse files Browse the repository at this point in the history
…e settings
  • Loading branch information
josegar74 committed May 20, 2014
1 parent 312e86d commit 1a25252
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import jeeves.server.ServiceConfig;
import jeeves.server.UserSession;
import jeeves.server.context.ServiceContext;
import org.fao.geonet.GeonetContext;
import org.fao.geonet.constants.Geonet;
import org.jdom.Element;

Expand Down Expand Up @@ -56,7 +57,9 @@ public Element exec(Element params, ServiceContext context) throws Exception
{
context.info("Creating default metadata tab");

data = "simple";
GeonetContext gc = (GeonetContext) context.getHandlerContext(Geonet.CONTEXT_NAME);
data = gc.getSettingManager().getValue("system/metadata/defaultView");
if (data == null) data = "simple";

session.setProperty(Geonet.Session.METADATA_SHOW, data);
}
Expand Down

0 comments on commit 1a25252

Please sign in to comment.