I'm generating a base64 image source at server side and then retrieving it to GWT client through async calls. Unfortunatelly, images are not showing after the callback ends (everything is working fine), but it is shown after a second callback. I have tryied to catch onLoad event immediatelly after creating the Image object, but it was no good.
Thanks!
Edit 1
After some investigation, it is a matter of dimensions, I mean, the base64 is there and the image tag is created correctly, but width and height are setted both to 0.
Edit 2
This is how I'm placing the image in the website:
import net.customware.gwt.dispatch.server.Dispatch
import com.google.gwt.user.client.rpc.AsyncCallback;
import com.google.gwt.user.client.ui.Image;
dispatch.execute(action, new AsyncCallback<GenerateImageResult> () {
@Override
public void onFailure(Throwable caught) {};
@Override
public void onSuccess(GetCarpetasResult result) {
String base64 = result.getBase64();
Image image = new Image(base64);
RootPanel.get().add(image);
}
});