On Friday, October 31, 2014 4:46:32 PM UTC-4, Alex Glaros wrote: > > Assume am total beginner: > > Argument below gets correctly passed to controller named > "comment_on_an_object". > > dict(header='Comments', body=lambda row: A('Comments',_class="btn > btn-mini", _href=URL('comment_on_an_object', vars=dict(filter=row.objectID > )))), > > looks good so far: > > http://127.0.0.1:8000/ES1/default/comment_on_an_object?filter=5 > > However I also want to pass the row ID of the row to the controller. How > is this done? I've already sent row.objectID. How to send row.id? >
Can't you just add the id to the URL variables: URL('comment_on_an_object', vars=dict(filter=row.objectID, id=row.id)) In which case, you have: http://127.0.0.1:8000/ES1/default/comment_on_an_object?filter=5&id=1 What do the receiving controller arg statements look like? > > commentsHeader=db.SuperObject(request.args(0)) ??? > commentsHeader2=db.objectComments(request.args(1)) ??? > You are using query string variables, not URL args, so instead of request.args, the values are in request.get_vars (also in request.vars): commentsHeader=db.SuperObject(request.get_vars.filter) commentsHeader2=db.objectComments(request.get_vars.id) 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.