Why would you want to run it twice? What effect are you trying to produce? Ian
http://examples.roughian.com 2009/12/30 lineman78 <[email protected]> > Can someone please tell me if it is possible to load the same module > twice. If so, how? I have tried including the script tag twice, > which used to work in older versions of gwt, but no longer works. I > was thinking that once it is loaded you could call the onModuleLoad > function manually, but cannot find how that would work. Another thing > I noticed is that if you do include the script tag twice, it writes > the code to the dom twice, but it is only executed once. If it is by > design that you can only run a module once by including the script > tag, maybe this ought to be prevented. I also tried using the cross > site linker, which is what i believe i used before to get this to > work. > > <module> > <define-linker name="xs" > class="com.google.gwt.core.linker.XSLinker"/ > > > <add-linker name="xs"/> > > <inherits name="com.google.gwt.user.User" /> > <source path="client" /> > > <define-property values="hello,goodbye,default" name="alerter" /> > > <property-provider name="alerter"> > <![CDATA[ > var alerter = $wnd.gwttester_alerter; > if (alerter == null){ > alerter = "default"; > } > return alerter; > ]]> > </property-provider> > > <replace-with class="com.gwt.client.alert.impl.HelloAlerter"> > <when-type-is class="com.gwt.client.alert.Alerter" /> > <when-property-is name="alerter" value="hello" /> > </replace-with> > > <replace-with class="com.gwt.client.alert.impl.GoodbyeAlerter"> > <when-type-is class="com.gwt.client.alert.Alerter" /> > <when-property-is name="alerter" value="goodbye" /> > </replace-with> > > <replace-with class="com.gwt.client.alert.impl.DefaultAlerter"> > <when-type-is class="com.gwt.client.alert.Alerter" /> > <when-property-is name="alerter" value="default" /> > </replace-with> > > <entry-point class="com.gwt.client.GWTClient"></entry-point> > </module> > > <html> > <head> > <meta http-equiv="content-type" content="text/html; > charset=UTF-8"> > <title>index</title> > </head> > <body> > <div> > <script type="text/javascript">var gwttester_alerter = > 'hello';</ > script> > <script type="text/javascript" language="javascript" > src="com.gwt.GWTTester.nocache.js"/> > </div> > <div> > <script type="text/javascript">var gwttester_alerter = > 'goodbye';</ > script> > <script type="text/javascript" language="javascript" > src="com.gwt.GWTTester.nocache.js"/> > </div> > </body> > </html> > > -- > > 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]<google-web-toolkit%[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.
