maybe this will help a bit understanding the different components
http://www.web2pyslices.com/main/slices/take_slice/74

On Jul 16, 10:19 am, Jonas Rundberg <[email protected]> wrote:
> Thank you,
>
> I've been trying to find more information about LOAD,
> web2py_component, web2py_ajax_page and web2py_trap_form, but I still
> don't get the big picture.
>
> What are the web2py_components?
> When should I use LOAD?...
> I'm using ajax, but when should I use the above instead of a
> 'standard' ajax(..., ..., target) request to a controller and put the
> response in an existing div?
> What are typical use case for LOAD, web2py_components, ...?
>
> Reading up in this group I get the impression that more people than me
> have questions.
> Is there any documentation you could point at?
> Could the 'Ajax Recipes' be updated in the book? (I can help if that's
> needed, as soon as I understand the concept enough)
>
> cheers
> / jonas
>
> On Jul 13, 7:06 pm, mdipierro <[email protected]> wrote:
>
>
>
> > BTW since 1.80.1 welcome include a generic.load
> > what is it?
>
> > Say you have
>
> >      def someaction():
> >          """ any action """
> >          return dict(form=crud.create(db.mytable))
>
> > which may or may not have a view. And you have another action
>
> >    def index(): return dict()
>
> > with its own view
>
> >     {{extend 'layout.htm'}}
> >     Hello
>
> > Now you can include an ajax callback from the latter to the former
> > with
>
> >     {{extend 'layout.htm'}}
> >     Hello
> >     {{=LOAD(request.controller,'someaction.load')}}
>
> > NOTICE .load. The form will be ebedded in the view. The processing
> > will not reload the page. The flash message will be displayed
> > correctly.
>
> > To use in old apps you need to copy views/generic.loadinto your old
> > app.

Reply via email to