I would think that z-index is the better solution.  Your mechanism for 
opening the popup ( rather than the popup itself) should be the one making 
the determination as to which z-index to use.   
Beyond a "system error" type of message, I personally don't think it's good 
UX to have popups throwing popups... but a requirement is a requirement.


On Tuesday, November 13, 2012 8:05:04 AM UTC-5, Thomas Lefort wrote:
>
> 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/-/o2FXPqnLRwsJ.
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.

Reply via email to