Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2015-06-05 Thread Alex Glaros
vars passed to controller doing grid search disappear seem that updating w2p to keep the vars after grid search would be a good improvement thanks! Alex Glaros -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) -

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Mandar Vaze
Current code looks like this : https://github.com/web2py/web2py/blob/master/gluon/sqlhtml.py#L2031 See if it helps -Mandar P.S. : I posted original query (2 yrs ago) but as mentioned earlier in the thread - I ended up using session variable though. -- Resources: - http://web2py.com -

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-27 Thread Alen Cerovic
Hi Mandar, as you pointed me to source it seems there is still just args parameter. I tried with session.vars but somehow I was loosing those vars and it just did not feel right to me. I ended up switching to args and pass those request.args to grid as args parameter. It works now but I like

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2014-10-25 Thread Alen Cerovic
two years later I am struggling with same problem, is grid vars parameter now included in web2py? Dana srijeda, 24. listopada 2012. 11:56:21 UTC+2, korisnik Niphlod napisao je: isn't this a little silly ? we have an args parameter to the grid but not a vars one Could you try to test a

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-25 Thread Niphlod
a) you can have the search form to do a get instead of a post. In that way when the user presses the button submit he is redirected to your page, and that page can load the grid with the parameters specified into request.vars b) with this you are sure that the parameters are reset if the user

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread lyn2py
When/where should I clean these variables from session ? In case user directly accesses second URL (without going thru first URL to select the search criteria) they might see incorrect results - since controller function will use old values I suggest to ensure that URLs must be

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Niphlod
isn't this a little silly ? we have an args parameter to the grid but not a vars one Could you try to test a little mod to the source. - open gluon/sqlhtml.py and scroll until def grid( - add a vars={} default parameter - a few line below, there's def url(**b) - change with this

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
Even if we were to add ability in grid to take vars as params - it may not be useful in my case (I think) because when controller is invoked for view/search/pagination, original request.vars are lost (that is why saving in session is needed) -Mandar On Wed, Oct 24, 2012 at 3:26 PM, Niphlod

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-24 Thread Mandar Vaze / मंदार वझे
On Wed, Oct 24, 2012 at 12:10 PM, lyn2py lyn...@gmail.com wrote: When/where should I clean these variables from session ? In case user directly accesses second URL (without going thru first URL to select the search criteria) they might see incorrect results - since controller function will

[web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread Mandar Vaze
Hi, I recently added a new SQLFORM.grid which is created based on parameters selected in previous controller function. The query used is based on the request.vars passed from previous controller. I can see the grid alright. (Something like this

[web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
I ran into a similar requirement recently. I used sessions to record the vars I needed. However I can do so because the user is required to click on links to move around the site (they can't guess the urls). That way I can control the variables stored on session. I didn't understand your

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread Mandar Vaze / मंदार वझे
lyn2py : Thanks. Your suggestion worked (you correctly understood the requirement) This thread elsewhere also suggested (indirectly) using the sessions. ( https://groups.google.com/forum/?fromgroups=#!searchin/web2py/sqlform$20with$20args/web2py/GC0EKaQ8Jjo/_tqgCZbctXkJ ) I was thinking in the

Re: [web2py] SQLFORM.grid created from request.vars - search, pagination etc breaks

2012-10-23 Thread lyn2py
In my case I was setting over the same session var, and each time checking the same var. --