I know I can call isc.version to determine the SmartClient version and this is also the version that is shown in the Developers Console. Is there another way to show the SmartGWT version without having to explicitly call Version.getVersion() in my Java code, but from the browser.
Announcement
Collapse
No announcement yet.
X
-
Thanks for the information. I tried that, but Firefox says "Syntax error" when I do:
I tried frames[0].$entry(@com.smartgwt.client.Version::getVersion());Code:$entry(@com.smartgwt.client.Version::getVersion());
But that also returns syntax error.Last edited by bwilkins30; 3 Apr 2013, 10:36.
Comment
-
That's because there is a syntax error. You're missing a set of parens. Refer to the JSNI syntax in the GWT docs.Originally posted by bwilkins30 View PostThanks for the information. I tried that, but Firefox says "Syntax error" when I do:
I tried frames[0].$entry(@com.smartgwt.client.Version::getVersion());Code:$entry(@com.smartgwt.client.Version::getVersion());
But that also returns syntax error.
Code:public static native void exportStaticMethod() /*-{ $wnd.getSgwtVersion = $entry(@com.smartgwt.client.Version::getVersion()()); }-*/;
Comment
-
Ok, but this also fails from Firefox web console. I don't want to create a public static native void method in my WAR, I want to just execute JavaScript from Firefox's web console. I didn't paste the Java portion into the web console, just the $entry.. part. I even tried pre-ceding it with frames[0].$entry(..) but that didn't work either.Originally posted by sjivan View PostThat's because there is a syntax error. You're missing a set of parens. Refer to the JSNI syntax in the GWT docs.
Code:public static native void exportStaticMethod() /*-{ $wnd.getSgwtVersion = $entry(@com.smartgwt.client.Version::getVersion()()); }-*/;Last edited by bwilkins30; 3 Apr 2013, 11:05.
Comment
-
I'm sorry, you had the right syntax earlier.
The extra parens would cause the method to execute while we just want to assign it to the function. I added the above method in my entry point's onModuleLoad() and called "getSgwtVersion()" from the FF web console and it correctly returned the SmartGWT version.Code:public static native void exportStaticMethod() /*-{ $wnd.getSgwtVersion = $entry(@com.smartgwt.client.Version::getVersion()); }-*/;
Comment
-
Thats good to know. However, I think you are missing my problem a bit. See, I can't change the WAR. It is deployed and running. How can I do this without changing the WAR? onModuleLoad is in the Java code that currently I am unable to change.Originally posted by sjivan View PostI'm sorry, you had the right syntax earlier.
The extra parens would cause the method to execute while we just want to assign it to the function. I added the above method in my entry point's onModuleLoad() and called "getSgwtVersion()" from the FF web console and it correctly returned the SmartGWT version.Code:public static native void exportStaticMethod() /*-{ $wnd.getSgwtVersion = $entry(@com.smartgwt.client.Version::getVersion()); }-*/;
Comment
-
No, it is for our QA folks who do not understand code to certify deployed versions.Originally posted by Isomorphic View PostWhat is the point of all this?
Do you suspect you've deployed an application where you've somehow mixed up the SmartGWT and SmartClient versions?
I could grepjar the smartgwt.jar but they want to see it in the GUI if possible.
Comment
Comment