Monday, July 14, 2014

Re: GWT JS Interopt



On Mon, Jul 14, 2014 at 10:56 PM, 田传武 <i@goodow.com> wrote:
Which linker do you use in your .gwt.xml module?

Normally, the exported stuff will not be available in JS until your GWT app is fully loaded.

On Monday, July 14, 2014 10:31:18 PM UTC+8, Eder Ignatowicz wrote:
Hi,

I'm starting to play with the new GWT features of JS Interopt. But
unfortunately I can not make the Hello World. :/

I want to make a Java Class accessible on JS.

Could anyone help me or point the right direction?

My @JsType

My Class:

@JsNamespace("$wnd.pug")
public class SampleClass implements SampleInterface {

    @JsExport("Dora")
    public SampleClass( String s ){

    }
}


My pom:

 <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-dev</artifactId>
      <version>2.7.0-SNAPSHOT</version>
    </dependency>
    <dependency>
      <groupId>com.google.gwt</groupId>
      <artifactId>gwt-user</artifactId>
      <version>2.7.0-SNAPSHOT</version>
    </dependency>


The scope pug are not visible on JS. Am I missing something?

Another stuff that I tried follow this example
https://github.com/ederign/realtime-store/blob/master/src/main/java/com/goodow/realtime/store/impl/HtmlStoreEntryPoint.java#L42-42
are patching the prototype. In that case I got the follow exception:

https://gist.github.com/anonymous/b6dc2bf95cc6dbedf1df


Does anyone have any idea of where I'm going wrong?

Does anyone can point me a project using this? Or a doc?


Thanks in advance

_____________
Eder Ignatowicz
ignat...@gmail.com

--
You received this message because you are subscribed to a topic in the Google Groups "Google Web Toolkit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-web-toolkit/fGIr4sRkz7s/unsubscribe.
To unsubscribe from this group and all its topics, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment