>From my reading, a straight port of your JSP logic to GWT wouldn't seem buy you very much. But certainly you can build a dynamic UI in GWT. One of the points of AJAX is to avoid page reloads, so here are some things you might consider:
1) For your wizard, keep all the state between steps on the client, and only submit to the server when the final step is completed. 2) Seems like you'll need an RPC call to fetch the UI metadata -- or possibly an RPC between each step to fetch the metadata for the next step. 3) You'll need something similar to your JSP's logic to examime the metadata and dynamically add the appropriate controls to the wizard panel. These are all fairly trivial, with (3) obviously being the meat of it. Basically, I would use your JSP for reference but basically junk it. Write an RPC service to fetch UI metadata, write a stateful (on the client) Wizard class (you can keep data between steps in a HashMap or some such), and write the metadata->control parser. In the simple case, the metadata parser may just be a big switch...case or if..else cascade, I don't know your metadata so you're in the best position to judge that. On Jul 15, 3:14 am, prasrob <[email protected]> wrote: > I'm still in process of learning GWT. So far completed the start up > tutorial and was sucessfully able to run sample applications. Now, i'm > in process to evaluate what would it need to use GWT in my current > struts / JSP /Servlet application. Here is some information about my > current application > > 1. Its a multi tier jsp/servlet application using struts as web > framework. > 2. Its a multi step, wizard like application. User will have to make > selection on each step. > 3. HTML Form elements displayed on a step depends on selection made on > previous step(s) i.e. If we should > display a particular radio button or not. > 4. Form elements displayed on a step also depends on business logic > (i.e. if form element should be enabled or > disabled) > > Based on my understanding so far, GWT only helps in writing a front > end (html/javascript) in java. Looking at the getting started guide i > figured out that the sample application is written in such a way that > it knows before hand (compile time) which elements to display on front > end. > > My objective is to find a way to render a complete dynamic front end > based on meta information stored in database. > In my current application we store various options for a page in > database. When a page is requested we go to database to get this > information as java object & then render the object on a jsp page. > In the database we do not store the information if the item should be > displayed as checkbox or a radio button. That logic is written in jsp > which basically means we know at design time if the element should > displayed as checkbox or radiobutton. > > So my questions to experts is how do i render a dymamic html page with > various form elements? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
