Re: [t5.4-beta-6] Page class member variable scope

2014-07-14 Thread Thiago H de Paula Figueiredo
On Sun, 13 Jul 2014 04:44:04 -0300, Geoff Callender wrote: By returning "this" you're doing a page refresh, which is an HTTP 302 redirect, instead of an AJAX response. So never return "this" in an event handler method unless you're really sure you want to force a full page refresh, and i

Re: [t5.4-beta-6] Page class member variable scope

2014-07-13 Thread Muhammad Gelbana
Exactly. I was thinking of a *submit*. But now that I thought about it, a submit may not be needed. But I tend prefer having every possible option available for me to handle whatever scenario I may face. I'll go with the ajax option. Thank you. *-* *Muhammad Gelbana* http://www

Re: [t5.4-beta-6] Page class member variable scope

2014-07-13 Thread Geoff Callender
Sorry, that sounds very odd to me. "refresh the page without refreshing it" sounds like a contradiction! Your Select has made an AJAX request. Why wouldn't you want an AJAX response, ie. a partial render? If you return the whole page then any other changes on the client-side will be overwritten

Re: [t5.4-beta-6] Page class member variable scope

2014-07-13 Thread Muhammad Gelbana
​Its ok to use Ajax, but is it the only way to update the page after a value is changed in a Select component ? If yes, wouldn't it be an improvement to be able to refresh the page​ without refreshing it and losing its state ? *-* *Muhammad Gelbana* http://www.linkedin.com/in/m

Re: [t5.4-beta-6] Page class member variable scope

2014-07-13 Thread Geoff Callender
By returning "this" you're doing a page refresh, which is an HTTP 302 redirect, instead of an AJAX response. The redirect causes the browser to issue a second request - a fresh page request - which will be freshly rendered by your stateless page class without any knowledge of the value you set