title: Help passing a complex object via a JSNI call to get around static scope
body: <p>So I've got a GWT app and I'm trying to invoke a function to change the app's view from an outside button.  Normally this is called with as "this.internalFunction('string')".  The problem is that JSNI works via static methods and so the object in question is lost.  The solution: pass the app's object itself to the JSNI call and invoke that object's function calls from there!  The problem to the solution: this doesn't work.  :(</p>
  
  <p>Class looks something like this:</p>
  
  <pre><code>package blah.package;
  public class Foo implements A, B {
      public native void initChangeFunc() /*-{
          $wnd.jsChangeView = $entry(this.@blah.package.Foo::doSomething
              (Lblah.package.Foo;)(this));
              //Pass this to the function call to do calls on app object
      }-*/;
      public void doSomething(Foo obj) {
          //Change view here.
          obj.internalFunction("parameter");
      };
      public void internalFunction(String param) {
          //Do stuff with param.
      }
  }
  </code></pre>
  
  <p>On module load, call initChangeFunc() and access jsChangeView() on the page itself.  </p>
  
  <p>Compile errors suggest that the compiler can't find blah.package.Foo, and that's because my parameter type signature (the Lblah.package.Foo part) is wrong.</p>
  
  <pre><code>[ERROR] Line 64: Expected a valid parameter type signature in JSNI method reference
  </code></pre>