adding a default default/crud_in_comp.load made the trick.

On Wed, Jul 20, 2011 at 2:12 PM, Anthony <abasta...@gmail.com> wrote:

> Do you have a /views/default/crud_in_comp.load view? If not, for now you'll
> need one, as generic views aren't working in non-ajax components at the
> moment (this should be fixed soon).
>
> Anthony
>
> On Wednesday, July 20, 2011 5:38:18 AM UTC-4, sebastian wrote:
>
>> Hi Anthony,
>>
>> I have not tested the trunk yet, but I have change those two lines
>>
>>             other_request.vars = Storage(vars)
>>             other_request.get_vars = Storage(vars)
>>
>> I still get an error:
>> invalid view (default/crud_in_comp.load)(in index.html)
>> {{=LOAD('default','crud_in_**comp.load',ajax_trap=True)}}
>>
>> (in default.py)
>> def crud_in_comp():
>>     return dict(crud=crud.create(db.auth_**user,message=None))
>>
>> any other file involved in that fix ?
>>
>> On Tue, Jul 19, 2011 at 9:39 PM, Anthony <abas...@gmail.com> wrote:
>>
>>>  Nightly build is not the same as trunk -- I'm not sure when it was last
>>> updated. You can pull trunk from the Google Code repository via Mercurial
>>> (you need to have Mercurial installed): http://code.google.com/p/**
>>> web2py/source/checkout <http://code.google.com/p/web2py/source/checkout>.
>>> Or you can just change the two relevant lines in your own copy of
>>> compileapp.py: http://code.google.com/p/**web2py/source/browse/gluon/**
>>> compileapp.py#126<http://code.google.com/p/web2py/source/browse/gluon/compileapp.py#126>(change
>>>  lines 124-125 in 1.97.1 to what's in lines 126-127 in trunk) -- it
>>> just uses Storage(vars) in place of vars.
>>>
>>> Anthony
>>>
>>> On Tuesday, July 19, 2011 4:28:45 PM UTC-4, apple wrote:
>>>
>>>> I downloaded the nightly build source and copied it on top of my
>>>> web2py directory. Still get the request.vars as dict. Is that
>>>> expected?
>>>>
>>>>  On Jul 19, 5:40 pm, Anthony <aba...@gmail.com> wrote:
>>>> > Oops, forgot we already fixed that in trunk, so it will be work
>>>> properly in
>>>> > the next release.
>>>> >
>>>> > Anthony
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> >
>>>> > On Tuesday, July 19, 2011 9:50:37 AM UTC-4, Anthony wrote:
>>>> > > Good catch. I'll submit a patch.
>>>> >
>>>> > > On Tuesday, July 19, 2011 8:56:08 AM UTC-4, apple wrote:
>>>> >
>>>> > >> I note that when ajax=False then request.vars is a dict rather than
>>>> a
>>>> > >> storage object.
>>>> >
>>>> > >> On Jul 19, 11:44 am, apple <sim...@gmail.com> wrote:
>>>> > >> > The following works fine with the SQLFORM line and ajax=false or
>>>> > >> > ajax=true. However replacing SQLFORM line with the CRUD line it
>>>> works
>>>> > >> > with ajax=true but fails with ajax=false, generating one of those
>>>>
>>>> > >> > annoying "restricted errors". I am guessing related to previous
>>>> issue
>>>> > >> > with request.vars and load?
>>>> >
>>>> > >> > CONTROLLER
>>>> > >> > def test():
>>>> > >> >     return dict()
>>>> > >> > def testload():
>>>> > >> >     form=crud.update(db.customer,"****1")
>>>> > >> >     #form=SQLFORM(db.customer,"1")
>>>> > >> >     return dict(form=XML(form.xml()))
>>>> > >> > TEST.HTML VIEW
>>>> > >> > {{extend 'layout.html'}}
>>>> > >> > {{=LOAD(c='crm',f='testload.**lo**ad', ajax=False,
>>>> ajax_trap=True)}}
>>>> > >> > TESTLOAD.LOAD VIEW
>>>> > >> > {{=form}}
>>>>
>>>
>>
>>
>> --
>> Sebastian E. Ovide
>>
>>
>>
>>
>>


-- 
Sebastian E. Ovide

Reply via email to