No success.
Here's what I tested in the controller:

* All these alternatives result in an input text with the integer value of
opportunity_id being rendered:
1) db.task.opportunity_id.represent=lambda opportunity_id:
opportunity_id.oppy_main_id.name
2) db.task.opportunity_id.represent=lambda opportunity_id:
db.opportunity[opportunity_id].oppty_main_id.name
3) db.task.opportunity_id.represent=lambda opportunity_id:
db.oppty_main[db.opportunity[opportunity_id].oppty_main_id].name

* The same tests preceeded by: db.task.opportunity_id.writable=False
1) raises exception:
db.task.opportunity_id.represent=lambda opportunity_id:
opportunity_id.oppy_main_id.name
AttributeError: 'NoneType' object has no attribute 'name'
2) & 3) The name represented in the <td> html element

Since I can't figure out an alternative way to accomplish this in the
controller, I'll use form.custom to do it on the view.
However, a controller based solution is still I believe relevant.

Miguel
--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.

Reply via email to