i have a different page which has named show and here its code:
<form action = "{{=URL('operations')}}" method = "POST" >
<legend>
İşlem yapacağınız tabloyu seçiniz.
<select name = "table">
<option value="computer">Bilgisayar</option>
<option value="pc_case">Kasa</option>
<option value="printer">Yazıcı</option>
<option value="scanner">Tarayıcı</option>
<option value="keyboard">Klavye</option>
<option value="mouse">Fare</option>
<option value="cable">Kablo</option>
<option value="cartridge">Kartuş</option>
</select>
<input type = "submit" value = "Tamam" >
</legend>
</form>
i get the choice with request.vars.table from the other page.
I tried to store the choice with session but I could not, as i sad, I'm
pretty new to web2py.
Sir, can you show that how can store the choice with session?
And I'm thankful for your quick reply, thanks a lot.
2015-08-08 15:25 GMT+03:00 Anthony <[email protected]>:
> Two additional (probably preferable) options:
>
> 1. Store the table selection in the session so you don't have to keep
> it in the URL.
> 2. Set the table name as a URL arg, and use the grid's "args" argument
> to tell the grid to ignore that arg (and leave it in place). The benefit of
> this approach is that you don't end up with an ugly query string in the
> URL, but the URL does show the table name, making it bookmarkable and more
> clear what resource is being retrieved.
>
> Anthony
>
> On Saturday, August 8, 2015 at 8:18:50 AM UTC-4, Anthony wrote:
>>
>> On Saturday, August 8, 2015 at 4:25:40 AM UTC-4, ESRA GÜÇLÜ wrote:
>>>
>>> requires.var.table gets the choice from user and it works sir.
>>> i can access the grid and i did but grid's buttons do not work because
>>> of having error.
>>>
>>
>> Yes, but how is request.vars.table being set (i.e., what does "choice
>> from user" mean)? Do you have a different page with a form where the user
>> makes a choice? If so, does the form's action point to the page with the
>> grid, or is it self-submitting followed by a redirect? Does the form make a
>> POST or a GET request? Please show all the relevant code.
>>
>> In short, for this to work, you need to put the table name in the URL
>> query string, otherwise it will not persist from request to request when on
>> the grid page.
>>
>> Anthony
>>
> --
> Resources:
> - http://web2py.com
> - http://web2py.com/book (Documentation)
> - http://github.com/web2py/web2py (Source code)
> - https://code.google.com/p/web2py/issues/list (Report Issues)
> ---
> You received this message because you are subscribed to the Google Groups
> "web2py-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.