I have a use case where I do need to show one dialog on top of the other.
The problem is that those dialogs are reused across the application and if
the one that should be on top for the use case happens to have been open
(in another use case) before the one that should be below, it is not
visible (covered by the other one) because (I believe) it was inserted in
the DOM before.
Is there an obvious way of doing this? Currently, the two strategies I can
think of to make sure the show method could always ensure that a dialog is
on top of the others are the following:
- zindex, scanning the list of open popups and check for the higfhest
zindex and setting the zindex of the one I am showing to zindex + 1
- detach/reattach the popup to the DOM.
I gave a quick try to the later one using the following code, which seems
to work:
@Override
public void show() {
Widget parent = getParent();
if(parent instanceof Panel) {
((Panel) parent).remove(this);
((Panel) parent).add(this);
}
// blabla do the rest
}
Any idea if this detach/reattach strategy can have any side effect?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-web-toolkit/-/V3-pRXF2GUMJ.
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.