example:
package org.example.yourcode.format.client; public class DateFormatterLib implements EntryPoint {
// Expose the following method into JavaScript. private static String formatAsCurrency(double x) { return NumberFormat.getCurrencyFormat().format(x); }
// Set up the JS-callable signature as a global JS function.
@Publish(jsMethod="$wnd.formatAsCurrency" klass=DateFormatterLib.class
method="formatAsCurrency(D)")
private native void publish() /-{
}-/;
// Auto-publish the method into JS when the GWT module loads. public void onModuleLoad() { publish(); } }
Comment #1
Posted on Jun 8, 2011 by Grumpy ElephantThe project already uses annotations
Status: Done
Labels:
Type-Defect
Priority-Medium