hi,
i am using a javascript calendar component. to be notified on changes, i
want to pass a callback function to it:
private native void setup(CalendarBox self, String displayAreaId, String
inputFieldId, String buttonId,
String dateString,
String format) /*-{
function delegate() {
@com.webfair.gwt.components.client.CalendarBox::test()
[email protected]
::fireDateChangedEventFromJS()
};
$wnd.Calendar.setup({
displayArea:displayAreaId,
inputField:inputFieldId,
daFormat:format,
ifFormat:'%d.%m.%Y',
date:dateString,
button:buttonId,
singleClick:true,
cache:true,
onUpdate : delegate
});
}-*/;
in my javascript-debugger i can see that "delegate" is executed properly,
but neither my test nor my actual listener method are called. there is no
error message and no exception.
i thought maybe it doesn't work in hosted mode, but in native mode - still
nothing.
here's the java source:
private static void test() {
LOGGER.info("test called");
System.out.println();
}
private void fireDateChangedEventFromJS() {
LOGGER.info("date changed");
if (isAttached() && setupDone) {
LOGGER.info("firing event");
fireDateChangedEvent();
}
}
any ideas?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.