On Wed, Jan 6, 2010 at 5:05 PM, <codesite-nore...@google.com> wrote: > Revision: 7364 > Author: jlaba...@google.com > Date: Wed Jan 6 14:04:31 2010 > Log: Adds the module name to the generated ID of FormPanel's iframe to > ensure that IDs are unique across modules. > > Patch by: jlabanca > Review by: jgw > > > http://code.google.com/p/google-web-toolkit/source/detail?r=7364 > > Modified: > /trunk/user/src/com/google/gwt/user/client/ui/FormPanel.java > /trunk/user/test/com/google/gwt/user/UISuite.java > /trunk/user/test/com/google/gwt/user/client/ui/FormPanelTest.java > > ======================================= > --- /trunk/user/src/com/google/gwt/user/client/ui/FormPanel.java Fri > Oct 16 14:48:33 2009 > +++ /trunk/user/src/com/google/gwt/user/client/ui/FormPanel.java Wed > Jan 6 14:04:31 2010 > @@ -394,7 +394,9 @@ > if (createIFrame) { > assert ((getTarget() == null) || (getTarget().trim().length() == 0)) > : "Cannot create target iframe if the form's target is already set."; > > - frameName = "FormPanel_" + (++formId); > + // We use the module name as part of the unique ID to ensure that > ids are > + // unique across modules. > + frameName = "FormPanel_" + GWT.getModuleName() + "_" + (++formId); > setTarget(frameName); > > sinkEvents(Event.ONLOAD); >
What about the case of multiple instances of the same module? -- John A. Tamplin Software Engineer (GWT), Google
-- http://groups.google.com/group/Google-Web-Toolkit-Contributors