It is works inside model file. But I have several controllers that
working with a same table and I need to set the controller name in
model. Currently I can't setup second controller. So assigning
field.represent in model is not suitable for me.
Can anyone describe me why assigning the field.represent in controller
with plugin_jqgrid doesn't work?
Model code:
db.define_table('plot',
Field('id','id',
represent=lambda id: SPAN(id,'
',A('edit',_href=URL(r=request,c='default',f='plot_update',args=id)))
#works!
...
Controller code:
def plot_list():
db.plot.id.represent=lambda id: SPAN(id,'
',A('edit',_href=URL(r=request,c='default',f='plot_update',args=id)))
# not works!!!
table=plugin_jqgrid(db.plot)
return dict(table=table)
Please help.