I think that should just work because @JsFunction is usually used to 
provide callback functions to JavaScript. I don't know your exact API but 
something like

@JsFunction
interface Action {
  void exec();
}

@JsType(native = true.....)
class Item {
  // Alternatively use java.lang.Runnable in latest 2.8-SNAPSHOT instead of 
a handmade Action interface
  public Item(String name, Action action) {}
}

menu.addItem(new Item("action", this::doAction));

should work. If it doesn't try latest GWT 2.8-SNAPSHOT.


-- J.

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

Reply via email to