I need to make some adjustment on a div css. But I can't do this on method onBind() or onReveal() because the html isn't loaded when this two method is called.
So I was wondering some way to automatically call a method right when the modification of my html(When a Presenter is called the html has to modify because new widgets will be add) load.
This is the method that I have to call:
private void hidePopup(){
$(".olLayerGooglePoweredBy, .olLayerGoogleV3, .gmnoprint").
css(CSS.VISIBILITY.with
(com.google.gwt.dom.client.Style.Visibility.HIDDEN));
}
I'm not sure I fully understand your question, but it seems to me like you are looking for a way to know when a widget has been added to the DOM.
If that is the case, I think the onLoad() method might be what you're looking for: http://google-web-toolkit.googlecode.com/svn/javadoc/2.5/com/google/gwt/user/client/ui/Widget.html#onLoad%28%29
The EntryPoint method onModuleLoad()
is that method - this will be called when the rest of the page has loaded. GWT doesn't start up quite like most JS frameworks, where you can write JS while the page is still loading. Instead, it can be assumed that when onModuleLoad
is invoked, the rest of the page is already ready to go.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With