Widgets can't duplicate themselves, and even if you call clone() on the element, the event handlers wouldn't work. You might be creating a second DialogBox or calling show() (or center()) twice. Can you put a breakpoint in PopupPanel#show() and see if it is being called twice?
Thanks, John LaBanca [email protected] On Thu, Feb 24, 2011 at 6:08 PM, Rob Tanner <[email protected]> wrote: > Hi, > > I use DialogBoxes for error messages on many of my on-line forms. Hit > the OK button (which does a close on the DialogBox) and they go away. > That's the way it should be. Now I'm working on a form that requires > users to read and accept a policy statement. I want to set it up like > a lot of license agreement screen you see when installing and/or > updating software, a box with a scrollable section containing the > license or, in this case, policy statement, and at the bottom of the > box you either accept of don't accept the policy. At this point, the > box is not yet complex. I took the same code that I use to generate > the error message DialogBoxes, added a ScrollPanel. The ScrollPanel > contains a single VerticalPanel that contains the policy statement and > an OK button (obviously nothing is in its final form yet). When I > scroll to the bottom of the text and hit the OK button, I find an > identical box containing the policy statement, etc, immediately > underneath. When I scroll all the way down and hit the OK button, > this second box goes away. > > I'm only doing one DialogBox.show() but it appear to be generating two > identical boxes. And just to be sure I was executing only a single > show() I did the quick and dirty debug trick of adding a > System.err.println() statement right before the show() and I got only > a single output on the console. I am using using GWT 2.1. > > Any ideas about what's going on? > > Thanks, > > Rob Tanner > Linfield College > > -- > 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. > > -- 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.
