Web2py components are really designed to live in their own div. If you are looking to build a single page application should should look into angular or ractive. They both work with web2py.
On Saturday, 18 April 2015 19:05:02 UTC-5, Gary Cowell wrote: > > Hello > > I'm struggling with components, with ajax. I've been trying to follow > examples in the book and blog and not getting very far. > > I have an application that's based on five controller functions, with a > page each. Each page has the same header at the top, and the bottom two > thirds of the page holds the form for that page. This clearly means that > when I choose a new menu option, I get a page refresh. > > So what I thought I wanted to do, was have the bottom two thirds of the > page hold a div and component, but a generic div into which I would load my > required form for the menu option that was just selected. > > So my menu options would cause a different form to load in the bottom of > the page, and process it as it does now. This would allow me also to > refresh sqlform.grid contents without a page reload too. > > So instead of five pages, I'd have one page, and five components, but only > one div for them to go in > > Does this sound like something possible? A reasonable way to construct an > app? The page reloads look kind of ugly at the moment. > > I'm struggling though with the examples, could someone please give a > couple of pointers about how this might be accomplished? > > Thanks > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.