Hi,
How can i show some view after onLoad is done. I have a popup which needs to
be positioned according to some other widget, but this widget is also
dynamically positioned, so i need to load the dom first and after that
position the popup:
pop.setPopupPosition(lastLabel.getLeft(), lastLabel.getTop() + 40);
For example if I have method in my view :
public MyView() {
........
//initialize all components but do not add them in the view container,
this will be done in the show method.
// hide the view - it will be shown when the show method is called
this.setVisible(false);
........
}
// this mettod is called in MyPresenter in onBind()
public void show(ViewId viewId) {
switch(viewId) {
case 1:
add3Labels();// shows 3 labels in vertical panel
break;
case 2:
add4Labels();// shows 4 labels in vertical panel
break;
case 3:
add5Labels();// shows 5 labels in vertical panel
break;
}
Label lastLabel = getLastLabel();
popup.setPopupPosition(lastLabel.getLeft(), lastLabel.getTop() + 40);
popup.show();
this.setVisible(true);
}
So, when this method is called the onLoad is not called yet and the popup is
not positioned in the right place because the last label is (may be) missing
in the dom or something?
I have menu that switches the viewId and after selecting other viewId it
works fine, but the problem is that when loading for the first time with the
devaultViewId this popup is not on the right place.
I also tried to play with revealDisplay and onRevealDisplay but no effect.
if someone has an idea, please help.
Regards.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.