Wednesday, August 31, 2011

fireOnResponseReceivedAndCatch on invoking setElement of Label in gwt v1.5.3

When I upgrade my GWT applicaiton from version 1.4.60 to 1.5.3, I
encount a exception when invoking setElement method for Label, please
see my Label class:

public class CLabel extends Label implements CWidget {
public CLabel() {
super();
}

public CLabel(ContentPanel p, String id) {
p.addInline(this, id);
}

public void onAddInline(Element elem) {
Element parent = DOM.getParent(elem);
int index = -1;
if (parent != null) {
index = DOM.getChildIndex(parent, elem);
}
if (index != -1 && DOM.getParent(elem) != parent) {
DOM.insertChild(parent, elem, index);
}
setElement(elem);
sinkEvents(Event.ONCLICK | Event.MOUSEEVENTS | Event.ONLOAD |
Event.ONERROR);
}

public void setHTML(String html) {
DOM.setInnerHTML(getElement(), html);
}
}

When I create Label at a HMTLPanel like below:
loginLabel = new CLabel();
addInline(loginLabel, "header_loginName");
if (loginName != null) {
loginLabel.setText(loginName);
}

when executing
addInline(loginLabel, "header_loginName")
an exepction as below will throw on executing setElementof in the
method of onAddInline:
fireOnResponseReceivedAndCatch():227, Request
{com.google.gwt.http.client}

please note this excepton throws only in hosted mode in gwt version
1.5.3, and it worked fine in old version 1.4.60 hosted mode and web
mode as well.

Thanks,
David

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate