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)
- https://
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 i
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
- http://w
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 te
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
On Wed, Oct 24, 2012 at 12:10 PM, lyn2py 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 use "old"
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 wro
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
>
> 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
In my case I was setting over the same session var, and each time checking the
same var.
--
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 di
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 req
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
http://www.mail-archive.com/web2py@googlegroups.c
13 matches
Mail list logo