On Tuesday, June 14, 2011 5:27:37 AM UTC-4, sebastian wrote:
>
> Thanks Anthony,
>
> I confirm that Replacing request.cid with
> request.env.http_web2py_component_element made the trick.
>
> Is there any reason why when ajax is false it is not stored in request.cid ?
>
>
Maybe Massimo can ans
Thanks Anthony,
I confirm that Replacing request.cid with
request.env.http_web2py_component_element made the trick.
Is there any reason why when ajax is false it is not stored in request.cid ?
On Tue, Jun 14, 2011 at 3:44 AM, Anthony wrote:
> On Monday, June 13, 2011 9:00:55 PM UTC-4, 黄祥 wr
a, i c, thank you so much for your detail explaination and reference,
anthony.
On Monday, June 13, 2011 9:00:55 PM UTC-4, 黄祥 wrote:
>
> pardon, me, what's cid used for? is it mandatory to use trap?
> thank you so much.
>
All components (with or without ajax=True) are wrapped in a DIV, which is
given an id. You can specify the id via the 'target' argument to LOAD() --
if
pardon, me, what's cid used for? is it mandatory to use trap?
thank you so much.
Note, I have added a comment to issue 286 on Google Code with the
explanation below.
On Monday, June 13, 2011 7:00:39 PM UTC-4, Anthony wrote:
> On Monday, June 13, 2011 6:21:01 PM UTC-4, sebastian wrote:
>>
>> anyway I would suggest to use ajax=true until
>> http://code.google.com/p/web2py/is
Right, you would not load each individual comment via individual LOADs
(except I think the new Google Groups does something similar). But you might
have individual components for Top 10 Comments, 10 Newest Comments, etc.
On Monday, June 13, 2011 6:21:01 PM UTC-4, sebastian wrote:
>
> anyway I would suggest to use ajax=true until
> http://code.google.com/p/web2py/issues/detail?id=286 is fixed
>
I'm not sure issue 286 is really a problem. ajax_trap is for trapping forms
within components, not for trapping links
It depends on the page imagine the case of a page with a lot of
comments... each comment has a like component... if you load each like via
ajax you will need to do a lot of ajax calls and the page would
take several seconds to load and you will be loading your webserver with
resou
It can be a little jarring but some believe this approach is a big trend in web
service design.
With ajax=True, first the parent page is returned to the browser, and then
an Ajax call is made to fill in the component. So, the parent page should
load a little faster in that case (because the component isn't called until
after), but there's an additional network call to get the component, so
i have a one field i.e) username
>
i want to accept only alphabets plz send this code
db.define_table('table1',
Field('username', 'string')
plz send code for this
--
@n!l m@n!ky@m
i have a one field i.e) username
>
i want to accept only alphabets plz send this code
db.define_table('table1',
Field('username', 'string')
plz send code for this
--
@n!l m@n!ky@m
Well it certainly seems faster. With Ajax=True the first part of the
page appears then there is a disconcerting pause before the rest.
On Jun 13, 9:37 am, pbreit wrote:
> Not necessarily. Ajax=true loads the page and component in parallel.
> Ajax=false waits for the component to load before rend
Not necessarily. Ajax=true loads the page and component in parallel. Ajax=false
waits for the component to load before rendering the page.
So there is no difference functionally (once problems are fixed).
However the page loads visibly faster in my application with
ajax=False.
So once the problems are fixed then presumably one would always use
ajax=False; setting ajax_trap to achieve desired functionality?
On Jun 12, 6:04 pm, Massim
a, it's clear for me know, thank you very much for your detail explaination
and reference, anthony, i think this is the answer about my ajax component
problems question, sorry, oot in the wrong room. again, thank you so much.
On Mon, Jun 13, 2011 at 7:53 AM, Anthony wrote:
> On Sunday, June 12,
a, i understand, right now, thank you so much for your explaination, massimo
On Sunday, June 12, 2011 7:11:10 PM UTC-4, 黄祥 wrote:
>
> pardon me, btw, what is the function of ajax_trap = True? what can do by
> ajax_trap = True?
> thank you so much.
>
ajax=True means the entire component is always loaded via Ajax (by calling
the web2py_component() function in /static/js
ajax = True does the same as ajax_trap = True. They both trap forms.
On Jun 12, 6:11 pm, Stifan Kristi
wrote:
> pardon me, btw, what is the function of ajax_trap = True? what can do by
> ajax_trap = True?
> thank you so much.
Traps the result in a div, there is some info in the book:
http://web2py.com/book/default/chapter/13
pardon me, btw, what is the function of ajax_trap = True? what can do by
ajax_trap = True?
thank you so much.
Right now there is a bug that means the request.vars don't get passed
correctly. I assume that will be fixed fairly quickly so ignoring that
for the moment:
As I understand it ajax=False means that the page is compiled on the
first request; but the components all have their own request object.
So
I stronly suggest always using ajax=True and not using ajax_trap=True.
Both trap forms. ajax_trap=True performs an extra optimization: it avoids
the first ajax call by serving the original content within the outer page.
people have reported some problems with this and I am working to fix it.
f
I think ajax_trap only pertains to form processing. My LOADs don't have any
forms and are all ajax=True. It's just a way to componentize pages. Example,
the categories and items on http://pricetack.com
25 matches
Mail list logo