java - Hard to make JSNI work with Errai -


i'm finding hard make jsni work directly errai, take example code:

private static native void _createcallout(javascriptobject callout)/*-{     $wnd.hopscotch.getcalloutmanager().createcallout(callout); }-*/; 

where jsni called roothing

@pageshowing public void onshow() {                 callout startcallout = new callout("dashboard", placement.right);                 startcallout.settitle("take example tour");                 startcallout.setcontent("start taking example tour see gwt-tour in action!");                 startcallout.setwidth(240);                 startcallout.centerxoffset();                 startcallout.centerarrowoffset();                 gwttour.createcallout(startcallout); // here! } 

where java code, callout works fine if first parameter id of div manually typed gwt app html, if on page template of errai, not work. ideas why not working?

the @pageshowing lifecycle method invoked before template has been added dom. pageshowing javadoc:

indicates target method should called when @page widget member of displayed in navigation content panel: after widget's @pagestate fields have been updated , before displayed in navigation content panel.

try using @pageshown instead.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

php - joomla get content in onBeforeCompileHead function -