updated method names for getScope

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/portal/client-context-library@133890 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Massimiliano Assante 2016-11-04 09:00:50 +00:00
parent 9c8f30bc83
commit 3502a20fe8
2 changed files with 23 additions and 5 deletions

View File

@ -20,11 +20,6 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.google.gdt.eclipse.core.webAppProjectValidator</name>
<arguments>
@ -35,6 +30,11 @@
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>

View File

@ -13,6 +13,24 @@ public class GCubeClientContext implements EntryPoint {
public void onModuleLoad() {}
public static native String getCurrentContextId() /*-{
var groupId;
if ($wnd.Liferay != null) {
groupId = $wnd.Liferay.ThemeDisplay.getScopeGroupId();
console.log("context id is = " + groupId);
}
return groupId;
}-*/;
public static native String getCurrentUserId() /*-{
var userId;
if ($wnd.Liferay != null) {
userId = $wnd.Liferay.ThemeDisplay.getScopeGroupId();
console.log("current userid is = " + userId);
}
return userId;
}-*/;
public static native void injectContext() /*-{
if ($wnd.Liferay != null) {
var userId;