If I add a "fields" statement in grid, this error arises:

'Row' object has no attribute 'id'

    db.SuperObject.objectDisplayName.represent = lambda value, r: 
A(db.SuperObject(r.SuperObject.id).objectDisplayName, 
 _href=URL('re_direct_specific_object', args=r.SuperObject.id, 
vars=request.vars))
    grid = SQLFORM.grid(query, details=False, deletable=False, 
create=False, editable=False, fields=[db.SuperObject.objectDisplayName])

If I comment out fields statement, it works with correct reference redirect 
via the "represent" statement

    db.SuperObject.objectDisplayName.represent = lambda value, r: 
A(db.SuperObject(r.SuperObject.id).objectDisplayName, 
 _href=URL('re_direct_specific_object', args=r.SuperObject.id, 
vars=request.vars))
    grid = SQLFORM.grid(query, details=False, deletable=False, 
create=False, editable=False) #, fields=[db.SuperObject.objectDisplayName])

If I comment out the represent, the field statement works

    #db.SuperObject.objectDisplayName.represent = lambda value, r: 
A(db.SuperObject(r.SuperObject.id).objectDisplayName, 
 _href=URL('re_direct_specific_object', args=r.SuperObject.id, 
vars=request.vars))
    grid = SQLFORM.grid(query, details=False, deletable=False, 
create=False, editable=False, fields=[db.SuperObject.objectDisplayName])

anyone see syntax errors?

thanks

Alex Glaros

-- 
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.

Reply via email to