11-17-2015 01:50 AM
Hi Team,
I am following http://community.hexagongeospatial.com/t5/Developers-Knowledge-Base/GMSC-Client-Extension-Deployment...
mentioned step, still not able to see scriptingobject and it's function in javascript.
code snippet of class is:
package com.hgdn.gmsc.india.extensions;
import com.intergraph.web.core.data.feature.Feature;
import com.intergraph.web.core.kernel.ApplicationContext;
import com.intergraph.web.plugin.webbrowser.handler.AbstractScriptingObject;
import com.intergraph.web.plugin.webbrowser.handler.Deferred;
import com.intergraph.web.plugin.webbrowser.handler.ScriptingObject;
import com.intergraph.web.viewer.data.GPrimitive;
@SuppressWarnings("javadoc")
@ScriptingObject(name = "ClientSessionFilterSO")
public class ClientSessionFilterSO extends AbstractScriptingObject
{
public Object setFilter(String sourceFeature, String featureToFilter, String selectedElement){return swingInvoke(() -> {... return Deferred.resolve(true);});}
public Object removeFilter(String featureToFilter){return swingInvoke(() -> {... return Deferred.resolve(true);});}
}
I have one more file in src->META-INF->services->com.intergraph.web.plugin.webbrowser.handler.IScriptingObject. It contains "com.hgdn.gmsc.india.extensions.ClientSessionFilterSO"
I am accessing scripting object in test.js as window.ClientSessionFilterSO as well as window.ClientSessionFilterSO.setFilter('','','') both are not accessible.
Regards,
Jai Ram Gaur
Solved! Go to Solution.
11-17-2015 02:47 AM
Hi jai,
after a quick shot on your code, I noticed that you call the method setting only 2 parameters. Your setFilter method requires 3 parameters. Maybe this is the issue.
Furthermore there are some samples for Scripting Objects on Bitbucket:
https://bitbucket.org/HGDN/hgdn_gmsc/
a discription will follow soon. So far we just managed to upload the code.
You can find scripting objects in the Google Streetview Sample.
Hope this helps.
Regards
Thomas
11-19-2015 03:38 AM
Hi Team,
I was creating wrong type of project, rest all was fine. I found one PDF file with all the steps to create project till deployment of plugin.
I am able to do my task now.
Thanks,
Jai Ram Gaur