Using pure html via jquery and interface fx is ok
---------------------------------------------------------------------------------------------------------------------------
<html>
<head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="interface/iutil.js"></script>
<script type="text/javascript" src="interface/idrag.js"></script>
<script type="text/javascript" src="interface/ifx.js"></script>
<script type="text/javascript">
function myFunc() {
$('#test').SwitchVerticaly(1000, function () {
restore();
});
}
function restore() {
alert("I am done");
$('#test').fxReset();
}
</script>
</head>
<body>
<a href="#" onClick="myFunc();">click me</a>
<div id="test">This is a test</div>
</body>
</html>
-------------------------------------------------------------------------------------------------------------------------
If you run the above it hides the div, display an window alert, and
then restores the div.
The restore callback function is invoked.
Using gwt, jquery, interface(fx module), is where my problem occurs. I
have
public class Test implements EntryPoint {
/**
* This is the entry point method.
*/
public void onModuleLoad() {
Hyperlink hl = new Hyperlink("click me", "click me");
hl.addClickListener(new ClickListener() {
public void onClick(Widget sender) {
myFunc();
}
});
Label label = new Label("This is a test");
RootPanel.get("slot1").add(label);
RootPanel.get().add(hl);
}
public static native void IamDone() /*-{
$wnd.$('#slot1').fxReset();
$wnd.alert("I am here");
}-*/;
public static native void myFunc() /*-{
$wnd.$('#slot1').CloseVerticaly(500, function() {
@com.client.Test::IamDone()();} );
//$wnd.$('#slot1').CloseVerticaly(500, function() { $wnd.restore();
} );
}-*/;
}
html file
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="interface/iutil.js"></script>
<script type="text/javascript" src="interface/idrag.js"></script>
<script type="text/javascript" src="interface/ifx.js"></script>
<script language="javascript">
function restore() {
alert("I am done");
$('#slot1').fxReset();
}
</script>
...
<div id="slot1"/>
The myFunc method, does hide the div, but the callback either to
jsni function or client side javascript does not work.
I know about the scriptaculous Effect module, but I want to use the
above.
Jquery is a smaller library. Thanks