This doesn't seem to work for me Fabiano,

When I click the button it just keeps table1 on the screen.  There has got 
to be an easier way (I hope)

On Thursday, June 5, 2014 7:41:51 PM UTC-4, Fabiano Almeida wrote:
>
> I use this:
>
> grid for table1
> def index():
>     return dict(grid=SQLFORM.grid(Almoxarifado, links = [lambda row: 
> A('Listar Objetos',_href=URL('objeto','index',args=[row.id]))], 
> user_signature=False, csv=False))
>
> grid for table2
> def index():
>     if (not request.args)  and (not request.vars): 
> redirect(URL('almoxarifado','index'))
>     alm = None
>     if request.args: alm = request.args(0)
>     try:
>         if alm:
>             alm = int(alm)
>             session.almoxarifado=alm
>             session.nomealmox = Almoxarifado[alm].nome
>     except ValueError:
>         pass
>     Objeto.almoxarifado_id.default = session.almoxarifado
>     form = SQLFORM.grid(Objeto.almoxarifado_id == session.almoxarifado, 
> fields=[Objeto.nome, Objeto.quantidade, Objeto.localizacao], 
> user_signature=False, csv=False)
>     return dict(form=form, nome=session.nomealmox)
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to