Multiple pages
Hi! I'm in trouble with this topic.. I have a list of users and a page with a TabPanel to manage them. In a TabPanel's bar I manage one user. The problem is that when I click on a bar the page remains the same, instead I want that it changes. I think I should use the Hyperlink but I have some confusion on it. Can you help me please? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Multiple Pages
On Oct 13, 9:36 am, Thomas Broyer t.bro...@gmail.com wrote: On 13 oct, 09:21, Elienan elie...@gmail.com wrote: form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() { @Override public void onSubmitComplete(SubmitCompleteEvent event) { // TODO Auto-generated method stub Window.alert(event.getResults()); form.reset(); commitPanel.add(confirmLabel); commitPanel.add(confirmButton); commitPanel.add(cancelButton); RootPanel.get().clear(); RootPanel.get().add(commitPanel); confirmButton.addClickHandler(new ClickHandler(){ I don't know where you create your confirmButton but, here, each time you submit the form, you'll add a click handler to the button (which as I understand it will be the very same instance each time). Same for your cancelButton and setCampaign. You'll generally add handlers near the line you *create* the widget, not where you *show* it.- Hide quoted text - - Show quoted text - Hi, Thanks a lot for your help. I was missunderstanding that concept of creating widgets and also handlers and then when I want to show them just add to new panel. I was creating the widgets in the beginning of application, but only adding handlers when I want to show the widgets. Now I added the handlers also in the beginning and it's running Ok (just appearing one time the message Window). Now I can add the real code with RPCs :) Thanks a lot!!! -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Multiple Pages
On Oct 11, 5:46 pm, Thomas Broyer t.bro...@gmail.com wrote: On 10 oct, 19:38, Elienan elie...@gmail.com wrote: Hi all, I'm new at GWT, trying to develop my first application with this tool. I already read a lot about multiple pages, and I followed the most common suggestion of have only one page, and then change pannels to change pages. I want to develop a set of pages that allow the users to go back and forward pages according as the button they select. I already can do this with success, but something strange it's happening. As long as I go back to a previous page I already was, the code executes twice the same. Every time I go to a page I already visited, the code is executed one more time than the previous visit. I always do a clear to RootPanel before add a different Panel. I can't understand why the code is incrementing execution times, because all variables from fields are being cleared. Can you please help me understangind why is this happening? Are you talking about using the History class? if so, make sure you're only registering a single ValueChangeHandler (unless you really know you need more); registering multiple times the same ValueChangeHandler will have it called as many times (it's a add not a set). Hi, I'm not using History, not yet :( Here is an example a portion of my code, after form submit. I show a new panel with Confirm or Cancel Button, and first time I choose one of this options, I can see the Window with Confirm or Cancel, and after this options, I go back to the form again, using another Button that appears in a new Panel, like code shows, but second time I fill the form with new values, then when I choose Confirm or Cancel Button, the code where Window appears executes twice, and third time I fill form, it appears three times the Window, and so on and so on... I put debug on the lines, and for example for ConfirmButton ClickHandler, I see it reaching ClickHandler for setCampaign Button and then go back to Window.alert(Confirm) as many times as I filled the form... and can't really understand how this happen and why not follow the code and go down to ClickHandler of setCampaign and so on... Thanks in advance, form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() { @Override public void onSubmitComplete(SubmitCompleteEvent event) { // TODO Auto-generated method stub Window.alert(event.getResults()); form.reset(); commitPanel.add(confirmLabel); commitPanel.add(confirmButton); commitPanel.add(cancelButton); RootPanel.get().clear(); RootPanel.get().add(commitPanel); confirmButton.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated method stub Window.alert(Confirm); statusPanel.add(statusLabel); statusPanel.add(setCampaign); RootPanel.get().clear(); RootPanel.get().add(statusPanel); setCampaign.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { // TODO Auto-generated method stub RootPanel.get().clear(); RootPanel.get().add(form); } }); } }); cancelButton.addClickHandler(new ClickHandler(){ @Override
Re: Multiple Pages
On 13 oct, 09:21, Elienan elie...@gmail.com wrote: form.addSubmitCompleteHandler(new FormPanel.SubmitCompleteHandler() { @Override public void onSubmitComplete(SubmitCompleteEvent event) { // TODO Auto-generated method stub Window.alert(event.getResults()); form.reset(); commitPanel.add(confirmLabel); commitPanel.add(confirmButton); commitPanel.add(cancelButton); RootPanel.get().clear(); RootPanel.get().add(commitPanel); confirmButton.addClickHandler(new ClickHandler(){ I don't know where you create your confirmButton but, here, each time you submit the form, you'll add a click handler to the button (which as I understand it will be the very same instance each time). Same for your cancelButton and setCampaign. You'll generally add handlers near the line you *create* the widget, not where you *show* it. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Multiple Pages
Hi all, I'm new at GWT, trying to develop my first application with this tool. I already read a lot about multiple pages, and I followed the most common suggestion of have only one page, and then change pannels to change pages. I want to develop a set of pages that allow the users to go back and forward pages according as the button they select. I already can do this with success, but something strange it's happening. As long as I go back to a previous page I already was, the code executes twice the same. Every time I go to a page I already visited, the code is executed one more time than the previous visit. I always do a clear to RootPanel before add a different Panel. I can't understand why the code is incrementing execution times, because all variables from fields are being cleared. Can you please help me understangind why is this happening? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: Multiple Pages
On 10 oct, 19:38, Elienan elie...@gmail.com wrote: Hi all, I'm new at GWT, trying to develop my first application with this tool. I already read a lot about multiple pages, and I followed the most common suggestion of have only one page, and then change pannels to change pages. I want to develop a set of pages that allow the users to go back and forward pages according as the button they select. I already can do this with success, but something strange it's happening. As long as I go back to a previous page I already was, the code executes twice the same. Every time I go to a page I already visited, the code is executed one more time than the previous visit. I always do a clear to RootPanel before add a different Panel. I can't understand why the code is incrementing execution times, because all variables from fields are being cleared. Can you please help me understangind why is this happening? Are you talking about using the History class? if so, make sure you're only registering a single ValueChangeHandler (unless you really know you need more); registering multiple times the same ValueChangeHandler will have it called as many times (it's a add not a set). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: multiple pages
i want to know how to manage pages navigation in other word how to load another page with GWT Component and remove the current component and support back next On Jun 20, 6:39 pm, Stefan Bachert stefanbach...@yahoo.de wrote: Hi Ahmed, with GWT you build a rich internet application. The concept of page does no more fit. This is different to a set of hyperlinked documents. What do you mean with Multiple Pages? a) Multiple entry points. Means different start sequences? Yes, this is possible b) Exchanges the whole application (layout) ? Yes, this is possible c) Something else? Please explain what you are going to achieve Stefan Bacherthttp://gwtworld.de On Jun 20, 1:56 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: can i make multiple pages in GWT it is one have its own onModuleLoad() can i do it ?? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
multiple pages
can i make multiple pages in GWT it is one have its own onModuleLoad() can i do it ?? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: multiple pages
Hi Ahmed, with GWT you build a rich internet application. The concept of page does no more fit. This is different to a set of hyperlinked documents. What do you mean with Multiple Pages? a) Multiple entry points. Means different start sequences? Yes, this is possible b) Exchanges the whole application (layout) ? Yes, this is possible c) Something else? Please explain what you are going to achieve Stefan Bachert http://gwtworld.de On Jun 20, 1:56 pm, Ahmed Shoeib ahmedelsayed.sho...@gmail.com wrote: can i make multiple pages in GWT it is one have its own onModuleLoad() can i do it ?? -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT project with multiple pages
The application that I'm working with has been around for a long time and has used a few different web frameworks. The last one we adopted (Tapestry 4) took that reverse approach of being the primary framework and providing an adaptor for the previous framework. This time around, I'm not looking to replace or re-implement the overall application structure, especially the menu system that's currently in place. I agree that it's not optimal and not taking full advantage of what a GWT application could be. However, it's more like having a collection of separate GWT applications that are deployed together. The reason for putting them all in one GWT module is to optimize compile time. There are some parts of GWT compilation that would be repeated unnecessarily if they were in separate modules. I know this because we implemented 2 features that way before realizing it would be a problem. One upside of my situation is that, while we have a lot of existing features implemented in other frameworks, we may eventually be able to leave those behind. Once we have enough of the new requirements implemented in GWT, we may be able to essentially extract an entirely new application where GWT is the primary framework, which will be reasonably easy to do. The other way to look at it is that there's no way we could adopt GWT at all if we weren't able to take this incremental approach. -Brian On Jun 17, 3:14 am, Stefan Bachert stefanbach...@yahoo.de wrote: Hi, On Jun 16, 3:14 pm, Brian Reilly brian.irei...@gmail.com wrote: This is a technique that I'm finding useful for using GWT to implement new features in an existing web application. With multiple pages you will lose the gui state of the GWT- application. Multipages will have poor user timing problems and latencies. When you do it reverse than you can maintain the gui-state. Reverse means that ONE GWT-Application reads the old paged application pages and than display them. I guess this approach will succeed on the long run because it allows to move to a modern, user friendly RIApplication Stefan Bacherthttp://gwtworld.de -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT project with multiple pages
Hi, On Jun 16, 3:14 pm, Brian Reilly brian.irei...@gmail.com wrote: This is a technique that I'm finding useful for using GWT to implement new features in an existing web application. With multiple pages you will lose the gui state of the GWT- application. Multipages will have poor user timing problems and latencies. When you do it reverse than you can maintain the gui-state. Reverse means that ONE GWT-Application reads the old paged application pages and than display them. I guess this approach will succeed on the long run because it allows to move to a modern, user friendly RIApplication Stefan Bachert http://gwtworld.de -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT project with multiple pages
This is a technique that I'm finding useful for using GWT to implement new features in an existing web application. The application already has a configuration-driven menu system that effectively resolves to a separate HTML file for each page. If I want to use GWT to implement new pages, I need to be able to configure what code to run when the page is loaded. This could be accomplished using separate modules, but keeping all of the code in a single module reduces build time (separate modules require separate GWT compilation steps, as far as I can tell). With everything in a separate module, it's then just a matter of applying use of GWT.runAsync() so that only the code for the requested page is downloaded rather than the entire module. I had been doing all of this in a hand-coded dispatching entry point, but having an annotation- driven code generator instead makes a lot of sense as it removes the burden of maintaining that hand-coded entry point. -Brian On Jun 15, 12:37 pm, Stefan Bachert stefanbach...@yahoo.de wrote: Hi, could you please tell what the benefit of multiple host pages should be? To me it still looks like a misconception because of still sticking with concepts of pre-AJAX era. Stefan Bacherthttp://gwtworld.de On Jun 13, 1:33 am, Mark mark.java.john...@gmail.com wrote: Hi, There is now a project on Google Code (http://code.google.com/p/gwt- multipage/) for managing multiple host pages. And, tutorials here -http://claudiushauptmann.com/andhere -http://uptick.com.au/content/managing-multiple-host-pages. Cheers Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT project with multiple pages
Hi, could you please tell what the benefit of multiple host pages should be? To me it still looks like a misconception because of still sticking with concepts of pre-AJAX era. Stefan Bachert http://gwtworld.de On Jun 13, 1:33 am, Mark mark.java.john...@gmail.com wrote: Hi, There is now a project on Google Code (http://code.google.com/p/gwt- multipage/) for managing multiple host pages. And, tutorials here -http://claudiushauptmann.com/and here -http://uptick.com.au/content/managing-multiple-host-pages. Cheers Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT project with multiple pages
Hi, There is now a project on Google Code (http://code.google.com/p/gwt- multipage/) for managing multiple host pages. And, tutorials here - http://claudiushauptmann.com/ and here - http://uptick.com.au/content/managing-multiple-host-pages. Cheers Mark -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT web application with multiple pages
thank you very much for your post. that was my first thought, but the problem is that i do need the ControlPage to control the ShowUpRoomPage after loading the ShowUpRoomPage... here my dumb solution: - 2 modules with uibinder - indexModule controls the dataModel and set it - showUpModule check every 1sec for new data :S see: http://halbgasse.appspot.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT web application with multiple pages
Do you really need multiple webpages though? Can't you have it all on the same webpage, but using a deck panel; http://examples.roughian.com/index.htm#Panels~DeckPanel Each page of the deckpanel can have your different screens on it, then you can flick between them fairly easily. On Jan 27, 5:59 am, priya supriy...@gmail.com wrote: Hi, I have just started with GWT. I need to have 4 screens taking with one another. example.. 1st screen: login screen. I need to validate user with backend table and depending on loggedon user I need to open 2nd screen in create mode with all fileds or 3rd screen with few fileds and readonly fileds. How can I have multiple pages and navigation between the pages in GWT web application? Do i need to create multiple entry points? Regards, Priya -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT web application with multiple pages
you i need something like: - loginpage control page open a showupRoom (tab or new window for the fullscreen monitor or beamer) - crontrol page: set what have to be shown on the showupPage. - showupRoom: show whatever is have been set in the control page. And that should be possible for every user so that every user gets his own object/thread/showroom. But i find out that something like that is not possible with gwt... or is it? example: http://halbgasse.appspot.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: GWT web application with multiple pages
You can easily do this. You can do the following: 1. Create LogonPage.java class (here you create the Logon Page UI, you can extends one of the GWT Panel Widget) 2. Create ControlPage.java class (here you again create the UI but for Control Page, again extends one of the GWT Panel Widget) 3. Create ShowUpRoomPage.java class (an UI for ShowUpRoomPage and of course again extends one of the GWT Panel Widget) And the you can do this: RootLayoutPanel.get().add (new LogonPage()); when you logon is successful and you are loading ControlPage: RootLayoutPanel.get().clear(); RootLayoutPanel.get().add (new ControlPage()); and the same goes for ShowUpRoomPage Hope its help erha On Jan 28, 9:19 pm, 4F2E4A2E osoriojaq...@gmail.com wrote: you i need something like: - loginpage control page open a showupRoom (tab or new window for the fullscreen monitor or beamer) - crontrol page: set what have to be shown on the showupPage. - showupRoom: show whatever is have been set in the control page. And that should be possible for every user so that every user gets his own object/thread/showroom. But i find out that something like that is not possible with gwt... or is it? example:http://halbgasse.appspot.com -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
GWT web application with multiple pages
Hi, I have just started with GWT. I need to have 4 screens taking with one another. example.. 1st screen: login screen. I need to validate user with backend table and depending on loggedon user I need to open 2nd screen in create mode with all fileds or 3rd screen with few fileds and readonly fileds. How can I have multiple pages and navigation between the pages in GWT web application? Do i need to create multiple entry points? Regards, Priya -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
multiple pages, single module, different urls
Hi, I've read the posts here: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/7ea87cb9ffa30954/7e951b48eca06f4a?lnk=gstq=login#7e951b48eca06f4a and here: http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/2b32e4d4011076c/60fe9f280a93877e?lnk=gstq=login#60fe9f280a93877e They discuss something similar to what I'm trying to accomplish but not completely. I have a single module application. Security will be through https + db-backed login + sessionId for all GWT-RPC requests. The app has several different types of users, and each will require a different login page, as well as different views. I know how to change/control the view through the root panel. I want to actually split the app up via URL, like this: https://www.example.com/abc/admin = displays login page for admin user for company abc https://www.example.com/abc/ = displays login page for regular user for company abc https://www.example.com/abc/client = displays login page for client user for company abc There will be multiple companies represented by this app and we require them to be differentiated by the url, so another example would be: https://www.example.com/xyz = displays login page for regular user for company xyz The application is functionally the same for all companies except for the css styling and the backend-database. My first question is how to actually deploy the app in this manner? This may be a completely dumb question, but since this is all static content, do I really need to duplicate these static files in a directory structure like this in the deployed war? app.war!/abc/admin/Admin.html app.war!/abc/User.html app.war!/abc/client/Client.html app.war!/xyz/admin/Admin.html Really, all I need to know is the contextPath from the root /abc or / xyz -- I need to get this information into the servlet for all GWT-RPC requests for the sole reason of figuring out which database I need to use. The other thing I need to figure out is how to do URL re-writing. If I don't duplicate all that stuff in the war, but instead have a single copy of it like: app.war!/admin/Admin.html app.war!/User.html app.war!/client/Client.html I suppose I could use an Apache front-end http://www.amitysolutions.com.au/documents/URLRewriting-technote.pdf and rewrite url requests like this: https://www.example.com/abc/admin == https://www.example.com/admin?c=abc Is there a better way? Am I just walking down the wrong path here? Thanks in advance, Davis --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
I'm trying to make a small app to log darts games. Basically, it should be possible to login with a user, register a new user, choose all the options for a new game and play that game. Playing the game means you just click the darts board on screen where you hit the board and the program calculates scores etc. The game page exists of a darts board and all the statistics. This is where I came up with my question because it is really hard to lay out these things in Java code. So I started searching for a possibility to load HTML (where the elements are layed out correctly) and work on the elements by getting them with RootPanel.get(...) instead of building the lay-out with panels in Java. Does this make it more clear what I'm trying to do? Also, how do I actually load HTML from the server into my app through Java? Maarten On 30 jul, 01:14, Ian Bambury ianbamb...@gmail.com wrote: Yes, like I said. Do the layout in the HTML and the functionality in the java code. Why don't you give a simple example of what you are wanting to do. There are many ways to do this and many levels of control you can give to the people who do the layout. It's not really possible to give a one-size-fits-all solution. Ian http://examples.roughian.com 2009/7/29 Maarten Decat maarten.de...@gmail.com Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
On 30 Jul., 10:22, Maarten Decat maarten.de...@gmail.com wrote: I'm trying to make a small app to log darts games. Basically, it should be possible to login with a user, register a new user, choose all the options for a new game and play that game. Playing the game means you just click the darts board on screen where you hit the board and the program calculates scores etc. The game page exists of a darts board and all the statistics. This is where I came up with my question because it is really hard to lay out these things in Java code. So I started searching for a possibility to load HTML (where the elements are layed out correctly) and work on the elements by getting them with RootPanel.get(...) instead of building the lay-out with panels in Java. Does this make it more clear what I'm trying to do? Also, how do I actually load HTML from the server into my app through Java? Use GWT-RPC or RequestBuilder (both are very well described in the docs) to get your html. Use iframe or just an HTMLPanel to display it. Maarten On 30 jul, 01:14, Ian Bambury ianbamb...@gmail.com wrote: Yes, like I said. Do the layout in the HTML and the functionality in the java code. Why don't you give a simple example of what you are wanting to do. There are many ways to do this and many levels of control you can give to the people who do the layout. It's not really possible to give a one-size-fits-all solution. Ian http://examples.roughian.com 2009/7/29 Maarten Decat maarten.de...@gmail.com Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
The easiest way is just to have the html in the host html page in a div with display:none Inside that div, have all the elements you need for the page, add widgets to these elements with RootPanel.get(id).add(something); and set the enclosing div to visible = true when you want it to be displayed. The other pages for a small app like this can also be shown and hidden as required in their own divs in the same way. As Alex said, you can keep the (GWT) 'pages' in their own html file, fetch them, extract the part you need and put it in an HTMLPanel as required. It doesn't seem worth it to me in this scenario. Ian http://examples.roughian.com 2009/7/30 Maarten Decat maarten.de...@gmail.com I'm trying to make a small app to log darts games. Basically, it should be possible to login with a user, register a new user, choose all the options for a new game and play that game. Playing the game means you just click the darts board on screen where you hit the board and the program calculates scores etc. The game page exists of a darts board and all the statistics. This is where I came up with my question because it is really hard to lay out these things in Java code. So I started searching for a possibility to load HTML (where the elements are layed out correctly) and work on the elements by getting them with RootPanel.get(...) instead of building the lay-out with panels in Java. Does this make it more clear what I'm trying to do? Also, how do I actually load HTML from the server into my app through Java? Maarten On 30 jul, 01:14, Ian Bambury ianbamb...@gmail.com wrote: Yes, like I said. Do the layout in the HTML and the functionality in the java code. Why don't you give a simple example of what you are wanting to do. There are many ways to do this and many levels of control you can give to the people who do the layout. It's not really possible to give a one-size-fits-all solution. Ian http://examples.roughian.com 2009/7/29 Maarten Decat maarten.de...@gmail.com Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat
Multiple pages question
Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
I think that the issue that you're running into here is one of mindset. Web developers think in terms of pages but a Swing/MFC/thick client developers dont. GWT is kind of a bridge between the two. From what i've seen, the GWT way of doing things is to clear out the visible components and render your new components to give the user a different view. (like you said) Now is your question how can i create these two views in separate java files (which is an architecture question) or how can i separate widget (element) composition from Java which is almost a philosophical question because GWT (at least as far as i've seen) is not designed to operate that way. (which i believe is a design feature, not an oversight) One other fly in the ointment that you may not have stumbled into yet which will blow your mind at first is using the back button. There is lots of documentation out there on using GWT History and it's really a different way of thinking coming from a web developer perspective. ...if you are asking the architecture question, so far i havent seen much yet on best practices for organizing your classes and widgets but you should start by searching for 'GWT Custom widgets' and specifically checking out the Composite class. That should get your started in how you can organize and compose your various views. Disclaimer... I've only been using GWT for about a month now but i've been doing Swing/Visual C++/VB gui's for a long time and to me GWT fits as naturally as anything i've ever seen from a web framework perspective. But it is very different from Swing, Spring MVC, JSF and the like. Trevis On Jul 29, 5:34 am, maarten.de...@gmail.com maarten.de...@gmail.com wrote: Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages question
Yes, like I said. Do the layout in the HTML and the functionality in the java code. Why don't you give a simple example of what you are wanting to do. There are many ways to do this and many levels of control you can give to the people who do the layout. It's not really possible to give a one-size-fits-all solution. Ian http://examples.roughian.com 2009/7/29 Maarten Decat maarten.de...@gmail.com Okay, I think I'm starting to see the different options. I can ask the same question more specific now. Formerly, I was used to working like this: I wrote PHP and added all the elements I needed (forms for example) in HTML. Someone else could take control of laying out these elements in any way he liked. He could alter the HTML of the page apart from my PHP and as long as the elements kept their names, everything kept working. This way, I could fix my attention on the program and others could fix their attention at the lay-out. In GWT it's possible to create a lay-out by positioning different widgets in Java code. It's also possible to give these widgets style names which let CSS take control of their layout. But is it also possible of laying out the elements without entering the Java code? I can see how to seperate lay-out with program code but the lay-out would still be specified in Java, no? Maarten On 29 jul, 20:21, Ian Bambury ianbamb...@gmail.com wrote: You have html in your index file. You have code in your java files. How you split everything up is your decision. In your html host page, you could have 2 divs, defining the layout for page1 and page 2. In your GWT code, yo make one or other visible as you need them. It might get a little unmanageable for 100 pages, so you could have html files on the server and go and pick them up as required. You can do both at the same time: have a basic menuing framework and pick up html from server-side pages and slot them into part of your app's display area. That's what my examples site does, mostly to keep all the text out of the initial download. It also means you can easily arrange to get spidered by search engines. Ian http://examples.roughian.com 2009/7/29 maarten.de...@gmail.com maarten.de...@gmail.com Hi, I've been trying out GWT for a couple of weeks now and stumbled upon a beginner's question relating multiple pages. For example, let's suppose an application with users where you have an application page, a login page and a register page. Using GWT for the application page speaks for itself, but what about the other pages? I've read the other topics about this problem in the group. It seems the proper GWT solution is to clear window and load another GUI there. This would actually wrap all the pages within the application. I can see how this solution would work, but then you lack a lot of usefull HTML pages that lay out the login and register forms. This way, making the lay-out of the page cannot be seperated from coding the application, at least not in HTML vs GWT/Java. Is there another way of working for this? One that does permit to seperate page lay-out and coding? Greets, Maarten Decat --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT (Multiple Pages Implementation)
Aye; using multiple modules in your project isn't necessary until it grows beyond a hundred K or so... You don't need more than one project, but that project can contain as many modules in as many packages as you like. Separating your various pieces into independent packages help the gwt compiler remove unneeded imports. Basically, anything that uses static code blocks, static variables that are assigned immediately {static final String something=t} and anything in entryPoint code code slip into a compile, even if it's not used directly. I know the compiler is supposed to vanquish this kind of stuff, but code like: static Object x = xBuildor() will have the reference to the object removed, but not the call to xBuildor, even if it just returns a string. By building your pieces in different modules, you are better prepared to deprecate old code, compile out unneeded excess and keep file sizes to a minimum. ALSO: You don't NEED to define EntryPoint's for any particular module. If you put all your interfaces and static worker functions into a module, you don't have to define an entry point, just make a .gwt.xml file which includes com.google.gwt.user.User, and your static tasks. This way, should you choose to test a new widget, but your current entry point runs conflicting code, you can still access all your static tasks without modifying your current build by adding a test module... If you want to use some xml encoding / decoding, I can send along a preview of my unmarshallor and JSNI classes... Basically, I built one giant JavaScriptObject overlay so I can get dirty with the JS without having to continually performing DynamicCasts Best of luck! -X On 5/1/09, Jamie jamiesharbor-sou...@yahoo.com wrote: Well, if you have a single GWT project, then every page will download the complete javascript file, which still contains the code for every page. However, in my experience, it is safe to make separate GWT projects (definitely using my own 'library' module of common components), and merge the output into (eg.,) the same deployment folder. The generated source files (with big long random? filenames) *should* not clash. I have never seen them clash, anyway. BTW, It is entirely possible that I am mistaken here; I seem to recall that 1.6 has some new lazy loading features. Jamie. On Apr 30, 1:22 pm, Vince vicenci...@aol.com wrote: Jamie and X... Thank you for the feedback! Based on your suggestions, the best approach is to improvise on the current technology. 1) Jamie, The lazy-load approach looks promising and it solidified our earlier researches. One question lingers however : Is it necessary to structure the entire app into several GWT projects or is it possible to setup multiple entry points... e.g. HTML-Entry Point class associations -- Module1.html - Module1:EntryPoint.class, Module2.html - Module2:EntryPoint.class and envoke these from the host HTML's lazy loading? Does this sound off on a GWT technical point-of-view? 2) X, that JAXB support component sounds interesting... I've used JaxMe before and it's a fantastic mechanism for mapping markups to objects straight-away. Your input is treasured! This is Great Stuff! Appreciate it much... - Vince -- He whose desires are drawn toward knowledge in every form will be absorbed in the pleasures of the soul, and will hardly feel bodily pleasure --I mean, if he be a true philosopher and not a sham one. - Plato Wise Words Whispered Without Will Won't Wake Worlds - Alyxandor Artistocles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT (Multiple Pages Implementation)
Well, if you have a single GWT project, then every page will download the complete javascript file, which still contains the code for every page. However, in my experience, it is safe to make separate GWT projects (definitely using my own 'library' module of common components), and merge the output into (eg.,) the same deployment folder. The generated source files (with big long random? filenames) *should* not clash. I have never seen them clash, anyway. BTW, It is entirely possible that I am mistaken here; I seem to recall that 1.6 has some new lazy loading features. Jamie. On Apr 30, 1:22 pm, Vince vicenci...@aol.com wrote: Jamie and X... Thank you for the feedback! Based on your suggestions, the best approach is to improvise on the current technology. 1) Jamie, The lazy-load approach looks promising and it solidified our earlier researches. One question lingers however : Is it necessary to structure the entire app into several GWT projects or is it possible to setup multiple entry points... e.g. HTML-Entry Point class associations -- Module1.html - Module1:EntryPoint.class, Module2.html - Module2:EntryPoint.class and envoke these from the host HTML's lazy loading? Does this sound off on a GWT technical point-of-view? 2) X, that JAXB support component sounds interesting... I've used JaxMe before and it's a fantastic mechanism for mapping markups to objects straight-away. Your input is treasured! This is Great Stuff! Appreciate it much... - Vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT (Multiple Pages Implementation)
The first question I have is, Do the pages need to talk to each other at all? I have found that a single GWT project with many (eg.,) tabs can definitely be a performance problem. As well, this does not lend itself to 'plugin' support where you want to add or remove pages based on (for example ) what modules are present on the server, and having the web interface packaged in the module itself. For one project, I was using a 'controller' GWT page that used lazy- loading iframes displayed in tabs, to display the various pages. The various pages were all separate GWT projects. The iframes would not load until the tab was activated. These subprojects ended up being quite lightweight, and there were no performance problems. Adding or removing pages based on plugin configuration was quite easy then. Additionally, it was easy enough to support other frameworks (showing non-GWT pages). Some of my pages did need to communicate. For that I wrote some GWT native javascript wrappers that could interact with the outer controller page. Jamie. On Apr 29, 4:25 pm, Vince vicenci...@aol.com wrote: Hello, I just started out with GWT and currently building a prototype that is intended as an enterprise skeleton application. The intent is to use GWT with Struts 2.0 (via a plugin). I now have the basic structure of the application and I have 3 simple pages that are facilitated by DeckPanels. Then it suddenly occurred to me... Having several panels (DeckPanels) to simulate pages in an enterprise web system could be trouble in performance and possibly maintenance (?). So I turned to the internet for some information and came upon suggestions ranging from embedded GWTs in JSPs using markups (Reminds me of YUI but that's another story) to multiple launching point HTMLs and matching EntryPoint classes. That said, and based on several informative readings, I come to the point of asking these questions to anybody who could provide me with an objective opinion and strong recommendation if possible. Simply put - Help! 1. What is Google's recommended paging approach (The way I understand it is via DeckPanels)? 2. How efficient is using a DeckPanel to accommodate several pages (Any number of pages in mind it could safely support)? 3. With an enterprise web app comprising of numerous screens (and when I say numerous please imagine our trusty old Eclipse editor's interface), would DeckPanels be recommendable? 4. What's a suitable alternative to DeckPanels (I would appreciate any recommendations)? I would appreciate any feedback, assistance and most importantly added knowledge on my part. Thanks, Vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT (Multiple Pages Implementation)
I'll second Jamie's reply; The best way to make a a fast, lightweight multi-page GWT application is to have a skeleton splash page which will do a little bit of UI to trick the user into thinking that the whole site is loaded {read: DeckPanel's that load iframes via the Frame object}; meanwhile, the actual content pages load seperately. So long as you have caching set up right in .htaccess {files with .cache. in them being cached for a month ~ a year}, you can preload the content pages in the browser cache by recursively loading a single iframe that the user MIGHT click on, poll for Frame.getElement()./*-{contentWindow.document.body}-*/;, remove the unneeded Frame, and do the next one. In this way, you will have a very fast initial startup for the main entry point, and potentially very fast startups for the sub modules. If you want to do this right, you'll need to segregate all your packages and modules so you can include the minimum dependancies for each subpage. Currently, my development path is: 1) Build main splash page - Display logos, builds a History-enabled menu, starts a silly animation to distract the user for a second 2) Build an xml-JS generic content page - I've made something of a JAXB module that will let me build text / image -based pages using declarative markup in xml, which I prefer embedding into the .html that the Frame loads to cut down on http requests. This method works for most of my pages, as it is output-only display, for the most part. 3) Build custom widgets seperately - Anything that will include vast amounts of overhead, or large amounts of text should be in it's own module, compiled and uploaded seperately so it's dependancies don't bloat the rest of the code. 4) Hookup any bi-di between your frames - I have a working module that extends Entry point, and both the inner and outer frame must extend it. Essentially, using interfaces and a little native hackery, you can give each xModule the ability to send and receive by hooking up Rx and Tx functions to the document's $wnd. Step one - Outer frame sets $wnd.Rx = xModule.xRx() Step two - Outer frame adds inner frame, polls lazily {250us} for innerFrame.contentWindow.Rx, Step three - Inner frame loads, also sets up Rx Step four - Polling function notices Rx set up, and builds a bridge of Tx functions in both the inner and outer frame. Essentially- outer.Tx = function(_){inner.Rx(_);} and inner.Tx = function(_){outer.Rx(_)}. The Java Tx functions of each simply check for these bridges, and uses them when they're ready. The key part of this is correctly ripping the Rx functions. I already have a means to add objects to the global window, so I extract a JavaScriptObject to represent the function with: public static final native JavaScriptObject xMultiplex(final xReceivor xToRip) /*-{ return function(_){xtor...@xbook.xfacets.client.xreceivor ::xRx(LxBook/logickmal/client/xRNA;)(_);}; }-*/; Note the final in the parameter xToRip... That's the 'var statement' to allow inner-function access to the object, and also note that xRNA extends JavaScriptObject because NO JAVA OBJECTS BESIDES RAW STRINGS, NUMBERS AND JS OBJECTS WILL BE TRANSLATABLE ACROSS INSTANCES OF MODULES. I hear Google is working on a code-splitting device to take large modules and slice them into smaller files, which will, I hope, allow us to use mutiple frames capable of understanding the same interfaces... As it is now, we cannot control how the gwt compiler renames fields and methods, and it's best not to try for(x in y)if(y[x]=...@some.java::pointer), as this will only cause major stress and waste time until the heroes at google feel their code splitting works. Until then, if you want your enterprise app to run fast and clean, consider using the server-side for communication as well. My personal goal is a GWT app that will run off a cd so I can put it in my bands demo, so I would rather use cross-frame hacks than server-side babysitting, but the choice is yours. Good luck! -- He whose desires are drawn toward knowledge in every form will be absorbed in the pleasures of the soul, and will hardly feel bodily pleasure --I mean, if he be a true philosopher and not a sham one. - Plato Wise Words Whispered Without Will Won't Wake Worlds - Alyxandor Artistocles --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT (Multiple Pages Implementation)
Hello, I just started out with GWT and currently building a prototype that is intended as an enterprise skeleton application. The intent is to use GWT with Struts 2.0 (via a plugin). I now have the basic structure of the application and I have 3 simple pages that are facilitated by DeckPanels. Then it suddenly occurred to me... Having several panels (DeckPanels) to simulate pages in an enterprise web system could be trouble in performance and possibly maintenance (?). So I turned to the internet for some information and came upon suggestions ranging from embedded GWTs in JSPs using markups (Reminds me of YUI but that's another story) to multiple launching point HTMLs and matching EntryPoint classes. That said, and based on several informative readings, I come to the point of asking these questions to anybody who could provide me with an objective opinion and strong recommendation if possible. Simply put - Help! 1. What is Google's recommended paging approach (The way I understand it is via DeckPanels)? 2. How efficient is using a DeckPanel to accommodate several pages (Any number of pages in mind it could safely support)? 3. With an enterprise web app comprising of numerous screens (and when I say numerous please imagine our trusty old Eclipse editor's interface), would DeckPanels be recommendable? 4. What's a suitable alternative to DeckPanels (I would appreciate any recommendations)? I would appreciate any feedback, assistance and most importantly added knowledge on my part. Thanks, Vince --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT project with multiple pages
I had this problem some months ago. I had several pages in the same project (GWT 1.4), sharing services, code and images. The first approach was to create several modules, but each module had to be compiled separately. The problem was that the whole compilation took num-modules times more than a single compilation. And the static contents (/public folder) were repeated num-modules times. Finally I moved to a single module approach with several EntryPoints. Each EntryPoint had a 'name' (Java constant): Module1, Module2, And each HTML page had a corresponding title: Module1, Module2, ... When opening an HTML page, all the EntryPoints are fired and each of them checks the HTML title against its name, and only the EntryPoint associated with the page begins to generate its panels. With a bit of OOP it's easy to implement. This was the only solution I found in case of: - several HTMLs, each for one specific form - almost all the code and images shared between forms And the benefits: - Only 1 compilation (4 minutes). - Only 1 copy of static contents (images, etc). On Mar 12, 9:47 am, zep zeljk...@hotmail.com wrote: Hello! My question is perhaps not so relevant for Ajax applications, but for various reasons (including CMS), I would like to have a GWT application with multiple pages. What is the best way to do this? I have thought to have a GWT module for each page, but wonder if it is practical? Grateful for your answers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT project with multiple pages
Why have multiple entry points? Why not just the one that decides which code to run? On Fri, Mar 13, 2009 at 6:12 AM, Magius antonio.diaz@gmail.com wrote: I had this problem some months ago. I had several pages in the same project (GWT 1.4), sharing services, code and images. The first approach was to create several modules, but each module had to be compiled separately. The problem was that the whole compilation took num-modules times more than a single compilation. And the static contents (/public folder) were repeated num-modules times. Finally I moved to a single module approach with several EntryPoints. Each EntryPoint had a 'name' (Java constant): Module1, Module2, And each HTML page had a corresponding title: Module1, Module2, ... When opening an HTML page, all the EntryPoints are fired and each of them checks the HTML title against its name, and only the EntryPoint associated with the page begins to generate its panels. With a bit of OOP it's easy to implement. This was the only solution I found in case of: - several HTMLs, each for one specific form - almost all the code and images shared between forms And the benefits: - Only 1 compilation (4 minutes). - Only 1 copy of static contents (images, etc). On Mar 12, 9:47 am, zep zeljk...@hotmail.com wrote: Hello! My question is perhaps not so relevant for Ajax applications, but for various reasons (including CMS), I would like to have a GWT application with multiple pages. What is the best way to do this? I have thought to have a GWT module for each page, but wonder if it is practical? Grateful for your answers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT project with multiple pages
One Abstract EntryPoint with a child EntryPoint for each form was OOP- nicer, but only one EntryPoint with a 'switch-case' will do the job. On Mar 13, 11:56 am, Vitali Lovich vlov...@gmail.com wrote: Why have multiple entry points? Why not just the one that decides which code to run? On Fri, Mar 13, 2009 at 6:12 AM, Magius antonio.diaz@gmail.com wrote: I had this problem some months ago. I had several pages in the same project (GWT 1.4), sharing services, code and images. The first approach was to create several modules, but each module had to be compiled separately. The problem was that the whole compilation took num-modules times more than a single compilation. And the static contents (/public folder) were repeated num-modules times. Finally I moved to a single module approach with several EntryPoints. Each EntryPoint had a 'name' (Java constant): Module1, Module2, And each HTML page had a corresponding title: Module1, Module2, ... When opening an HTML page, all the EntryPoints are fired and each of them checks the HTML title against its name, and only the EntryPoint associated with the page begins to generate its panels. With a bit of OOP it's easy to implement. This was the only solution I found in case of: - several HTMLs, each for one specific form - almost all the code and images shared between forms And the benefits: - Only 1 compilation (4 minutes). - Only 1 copy of static contents (images, etc). On Mar 12, 9:47 am, zep zeljk...@hotmail.com wrote: Hello! My question is perhaps not so relevant for Ajax applications, but for various reasons (including CMS), I would like to have a GWT application with multiple pages. What is the best way to do this? I have thought to have a GWT module for each page, but wonder if it is practical? Grateful for your answers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: GWT project with multiple pages
It seems like deferred binding would be a better approach from a whole number of perspectives (although I'm not sure if you can define a custom pivot point that's not based on user-agent or localization). If you can figure out a way, you'll get performance benefits (compilation-time determination of which module to use) cleaner code (modules don't have to filter - it'll be done by GWT.create at compile-time). The trick is that the title on the HTML page isn't available to the GWT compiler. On the other hand, it will slow down your compilation by num pivot points again. Trade-offs, trade-offs. On Fri, Mar 13, 2009 at 7:14 AM, Magius antonio.diaz@gmail.com wrote: One Abstract EntryPoint with a child EntryPoint for each form was OOP- nicer, but only one EntryPoint with a 'switch-case' will do the job. On Mar 13, 11:56 am, Vitali Lovich vlov...@gmail.com wrote: Why have multiple entry points? Why not just the one that decides which code to run? On Fri, Mar 13, 2009 at 6:12 AM, Magius antonio.diaz@gmail.com wrote: I had this problem some months ago. I had several pages in the same project (GWT 1.4), sharing services, code and images. The first approach was to create several modules, but each module had to be compiled separately. The problem was that the whole compilation took num-modules times more than a single compilation. And the static contents (/public folder) were repeated num-modules times. Finally I moved to a single module approach with several EntryPoints. Each EntryPoint had a 'name' (Java constant): Module1, Module2, And each HTML page had a corresponding title: Module1, Module2, ... When opening an HTML page, all the EntryPoints are fired and each of them checks the HTML title against its name, and only the EntryPoint associated with the page begins to generate its panels. With a bit of OOP it's easy to implement. This was the only solution I found in case of: - several HTMLs, each for one specific form - almost all the code and images shared between forms And the benefits: - Only 1 compilation (4 minutes). - Only 1 copy of static contents (images, etc). On Mar 12, 9:47 am, zep zeljk...@hotmail.com wrote: Hello! My question is perhaps not so relevant for Ajax applications, but for various reasons (including CMS), I would like to have a GWT application with multiple pages. What is the best way to do this? I have thought to have a GWT module for each page, but wonder if it is practical? Grateful for your answers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
GWT project with multiple pages
Hello! My question is perhaps not so relevant for Ajax applications, but for various reasons (including CMS), I would like to have a GWT application with multiple pages. What is the best way to do this? I have thought to have a GWT module for each page, but wonder if it is practical? Grateful for your answers! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: Multiple pages with entry points
Hi I would go with one html page that points to your entry point. Then just import your page 2 widgets. On Oct 21, 11:06 am, Michi_de [EMAIL PROTECTED] wrote: Hi, is there any way to create an application like this for example: page1.html - i implement my gwt application with div id= tag. page1.html - it also contains following code: script type=text/javascript language=javascript src=extGWTformular.Formular.nocache.js/script in my gwt.xml there is the following entry point definded: entry-point class='extGWTformular.client.Formular'/ Works just fine. Now the page1.html includes a href link to page2.html In page2.html i wanted to use some GWT function too. I also thought its just easy as it is in the first entry point: add a div.. tag and the script..., done. But it doesnt work. Is it possible, to implement such a application? Or is it just possible to use one html page which contains all widgets ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com 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 -~--~~~~--~~--~--~---
Multiple pages with entry points
Hi, is there any way to create an application like this for example: page1.html - i implement my gwt application with div id= tag. page1.html - it also contains following code: script type=text/javascript language=javascript src=extGWTformular.Formular.nocache.js/script in my gwt.xml there is the following entry point definded: entry-point class='extGWTformular.client.Formular'/ Works just fine. Now the page1.html includes a href link to page2.html In page2.html i wanted to use some GWT function too. I also thought its just easy as it is in the first entry point: add a div.. tag and the script..., done. But it doesnt work. Is it possible, to implement such a application? Or is it just possible to use one html page which contains all widgets ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com 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 -~--~~~~--~~--~--~---