Closed GoogleCodeExporter closed 9 years ago
Pasted this in the kitchen sink demo and it works as expected:
HTMLComponent h = (HTMLComponent)wb.getInternal();
h.setEventsEnabled(true);
h.setHTMLCallback(new HTMLCallback() {
public void titleUpdated(HTMLComponent htmlC, String title) {
System.out.println("titleUpdated");
}
public void pageStatusChanged(HTMLComponent htmlC, int status, String url) {
System.out.println("pageStatusChanged");
}
public String fieldSubmitted(HTMLComponent htmlC, TextArea ta, String actionURL, String id, String value, int type, String errorMsg) {
System.out.println("fieldSubmitted");
return null;
}
public String getAutoComplete(HTMLComponent htmlC, String actionURL, String id) {
System.out.println("getAutoComplete");
return null;
}
public int getLinkProperties(HTMLComponent htmlC, String url) {
System.out.println("getLinkProperties");
return 0;
}
public boolean linkClicked(HTMLComponent htmlC, String url) {
System.out.println("linkClicked");
return true;
}
public void actionPerformed(ActionEvent evt, HTMLComponent htmlC, HTMLElement element) {
System.out.println("actionPerformed");
}
public void focusGained(Component cmp, HTMLComponent htmlC, HTMLElement element) {
System.out.println("focusGained");
}
public void focusLost(Component cmp, HTMLComponent htmlC, HTMLElement element) {
System.out.println("focusLost");
}
public void selectionChanged(int oldSelected, int newSelected, HTMLComponent htmlC, List list, HTMLElement element) {
System.out.println("selectionChanged");
}
public void dataChanged(int type, int index, HTMLComponent htmlC, TextField textField, HTMLElement element) {
System.out.println("dataChanged");
}
public boolean parsingError(int errorId, String tag, String attribute, String value, String description) {
System.out.println("parsingError");
return true;
}
});
Original comment by shai.almog
on 12 Apr 2012 at 6:21
Original issue reported on code.google.com by
jkoo...@gmail.com
on 11 Apr 2012 at 11:50