Categories
Development Java

GWT: Getting rid of iframe borders in IE8

IE8 defaults to displaying a frame border on iframes, this can be overridden by using the IFrameElement class.

Example:

IFrameElement.as(yourFrameClass.getElement()).setFrameBorder(0);
Categories
Development Java

GWT: “For security purposes, this type will not be serialized.”

The full error message you can get is: “Foo was not included in the set of types which can be serialized by this SerializationPolicy or its Class object could not be loaded. For security purposes, this type will not be serialized.”

This is normally caused by using a non-serializable class, which can happen if your class does not implement serializable or if you have forgotten to add a empty constructor.

Categories
Java

EXT GWT: Adding onClick to Labels

I had a issue where i needed to add a click handler for labels in EXT GWT, the solution i came up with was as follows

theLabel.addListener(Events.OnClick, new Listener() {
@Override
public void handleEvent(BaseEvent be) {
    // TODO Auto-generated method stub
}});

 

Categories
Java

Debugging GWT: Did you forget to inherit a required module?

You will receive this error if you are using classes in your GWT project that GWT does not have access to. Make sure that you have added something like this in your gwt.xml file, within your module element:

    <source path="path.to.classes" />