inputmask in combination with gwt in the following way:
public class JQueryMask {
public native static void setMask(Element elem,String mask) /*-{
$wnd.jQuery(elem).find("input").inputmask(mask);
$wnd.jQuery(elem).find("input").change(function(e) {
});
}-*/;
public native static void removeMask(Element elem) /*-{
$wnd.jQuery(elem).find("input").inputmask("remove");
}-*/;
public native static void setMaskWithGreadyFalse(Element elem,String mask) /*-{
$wnd.jQuery(elem).find("input").inputmask({mask:mask,greedy:false});
$wnd.jQuery(elem).find("input").change(function(e) {
});
}-*/;
}
This methods are called when the widget is initialized and everything works in the browser. The jQuery variable does not get initialized this produces the same exception:
console.log($wnd.jQuery());
also:
console.log($wnd.$());
Which is:
com.google.gwt.core.client.JavaScriptException: (null) @assembly.gwtlib.gui.plugins.JQueryMask::removeMask(Lcom/google/gwt/dom/client/Element;)([JavaScript object(77)]): null
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:249)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:576)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:304)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at assembly.gwtlib.gui.plugins.JQueryMask.removeMask(JQueryMask.java)
at assembly.gwtlib.gui.widget.input.Input.setMask(Input.java:54)
at assembly.gwtlib.gui.widget.input.DateInput.(DateInput.java:76)
...