Muhannad, There's a problem with your assumptions. When a user clicks on your "about" menu link, she's not going to get a Panel, she's going to get a whole new page from http://domain/about/index.html. That page can be a GWT host file if you like, but this is regular HTML pages, not a rich GWT client showing and hiding content based on menu navigation. I think you'd better get your head around that first, and then tackle the RPC URL binding question next, if it's even an issue at all.
Walden On Nov 5, 5:12 am, Muhannad <[EMAIL PROTECTED]> wrote: > Hi, > > I want to build a website with (Home, about, products, ...) menu. I > need to build multiple forms (panels), each panel corresponds to one > menu item, e.g. aboutPanel for "about" menu item, productsPanel for > "products"... > > Moreover, I would like to implement that panel in terms of RPC > services; I need to correspond each panel to a single RPC service that > communicates with the server to get its data, build the whole form, > and return the result as a panel to be displayed somewhere in the home > page (for example). > > Of course, GWT allows us to define multiple services and add multiple > <servlet path="/service" ...> to the module XML file. > > My problem is how to know which service should I instantiate depending > on the URL mapping, i.e. suppose that the menu is defined as follow: > > <div id="menu"> > <a href="index.html">Home</a> > <a href="/about">About us</a> > <a href="/products">Products</a> > ... > </div> > > So when someone clicks the "About us" link, the URL would be "http:// > domain/about". So I should instantiate the "about" service and create > an aboutPanel to display it. The same thing when s/he clicks the > "Products" link, then the URL is "http://domain/products" and, in this > case, I should build the product panel... > > So, is there somewhere in GWT application that I could parse the URL > and depending on the mapping portion of it "/about" or "/products" > could I decide which service to instantiate? Or is there another > better way to do that? > > Thank you very much in advance. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
