I implemented a much easier way of defining which default module to use while loading or compiling. Create a completely new .html .css file pointing to your other module and you can edit the eclipse .launch file by changing the line
<code> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www GWTApp/GWTApp.html"/> </code> to the new .html file which loads the other module in the same project. <code> <stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-out www GWTAppNew/GWTAppNew.html"/> </code> Keep in mind to edit the new .html file and point it to the new module in the src value. <code> <script type="text/javascript" language="javascript" src="GWTAppNew.nocache.js"></script> </code> I implemented it and it works like a charm. I even have the second module called from the first module using a link. The only complex part comes while deploying, when you will have to compile both the modules separately and keep it in one war file (if deployed on tomcat). Hope this helps... Let me know if you need more help on it, but I recommend you first experiment it yourself. Vishesh.. On Wed, May 6, 2009 at 10:38 AM, Salvador Diaz <[email protected]>wrote: > > Google Web Toolkit 1.6.4 > HostedMode [-noserver] [-port port-number | "auto"] [-whitelist > whitelist-string] [-blacklist blacklist-string] [-logLevel level] [- > gen dir] [-style style] [-ea] [-server servletContainerLauncher] [- > startupUrl url] [-war dir] [-extra dir] [-workDir dir] [-localWorkers > count] module[s] > > where > -noserver Prevents the embedded web server from running > -port Specifies the TCP port for the embedded web server > (defaults to 8888) > -whitelist Allows the user to browse URLs that match the > specified regexes (comma or space separated) > -blacklist Prevents the user browsing URLs that match the > specified regexes (comma or space separated) > -logLevel The level of logging detail: ERROR, WARN, INFO, > TRACE, DEBUG, SPAM, or ALL > -gen The directory into which generated files will be > written for review > -style Script output style: OBF[USCATED], PRETTY, or > DETAILED (defaults to OBF) > -ea Debugging: causes the compiled output to check assert > statements. > -server Specifies a different embedded web server to run > (must implement ServletContainerLauncher) > -startupUrl Automatically launches the specified URL > -war The war directory to write output files into > (defaults to war) > -extra The directory into which extra, non-deployed files > will be written > -workDir The compiler work directory (must be writeable; > defaults to a system temp dir) > -localWorkers Specifies the number of local workers to use when > compiling permutations > and > module[s] Specifies the name(s) of the module(s) to host > > On May 6, 3:02 pm, "harjit.singh" <[email protected]> > wrote: > > Thanks for the answer. When I have multiple modules and try to run the > > application. The GWT webserver asks me to choose a module to run. Is > > there any way to specify a default module to run when you have more > > than one module ? > > > > Thanks > > > > - Harjit > > > > On May 5, 8:20 pm, Vishesh <[email protected]> wrote: > > > > > Try the code between the tags: > > > <code> > > > String lnk = GWT.getModuleBaseURL() + "newPage.html?Parameter1=" + > > > parameter1 "&Parameter2=" + parameter2; > > > Window.open(lnk,"New Window",""); > > > </code> > > > It will open a new window which can be a different module with its onw > > > onModuleLoad() within the same project. > > > Hope this helps.. > > > Vish.. > > > > > On Tue, May 5, 2009 at 6:26 PM, harjit.singh < > > > > > [email protected]> wrote: > > > > > > Sumit, > > > > > > Thanks for the response. I did the way you described it using JSP. > > > > > > I have one more question on the same lines. how can I call another > > > > module from a link ? > > > > > > Thanks > > > > > > - Harjit > > > > > > On May 5, 2:53 pm, Sumit Chandel <[email protected]> wrote: > > > > > Hi Harjit, > > > > > > > Assuming that you really need these windows to be actual native > browser > > > > > windows (and not simply popup panels, in which case you could use > the > > > > > PopupPanel class), and further assuming that the HTML in the new > windows > > > > > will need to be populated with some data from the server-side, here > is a > > > > > proposed solution. > > > > > > > Let's say you want to have some link-styled text that can be > clicked to > > > > > create the new window. You could do this by creating an HTML > snippet and > > > > > adding a click handler to it. You would also need to style the HTML > > > > snippet > > > > > to make it look like a link. > > > > > > > In the click handler, you could make a callback to your server-side > that > > > > > could read in whatever data is passed in the call and generate an > HTML > > > > page > > > > > that will be served in the new window. Once the RPC completes, you > can > > > > > create a new window sourced to the generated HTML page in the > onSuccess() > > > > > method. > > > > > > > Alternatively, you could pre-generated these pages in timed > background > > > > RPCs > > > > > and simply create an anchor tag sourced to the generated pages once > > > > they're > > > > > ready. > > > > > > > Hope that helps, > > > > > -Sumit Chandel > > > > > > > On Fri, May 1, 2009 at 2:15 PM, harjit.singh < > > > > > > > [email protected]> wrote: > > > > > > > > Hi there, > > > > > > > > I have an GWT application. Right now what I'm doing is that I'm > > > > > > displaying the data in a single grid with all the buttons in a > row . > > > > > > Each button has a listener. when i click one of the buttons, it > hides > > > > > > the other widgets and displays the required widgets on the same > page > > > > > > and displays some data on the same page. I have added a back > button to > > > > > > the page and when the back button is clicked the app hides the > panels > > > > > > and displays the other panels. > > > > > > > > What I need to do is following > > > > > > > > 1) instead of having a button I need a link and when that link is > > > > > > clicked it would open the a URL in a seperate window and then > later on > > > > > > display some data in that window. > > > > > > > > What approach should I take ? > > > > > > > > How can I have multiple htmls and call them from the GWT module > or > > > > > > have multiple entry points to the application and call it ? > > > > > > > > Thanks > > > > > > > > - > > > > > -- > > > Vishesh Sahu > > > > > > > -- Vishesh Sahu --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
