Thanks. It helped a bit. I see I had to use table.extra and not
table.extrajs as in the example I followed.
But my problems are not over :(
My controller:
def pwrtable():
"""
Generiese definisie vir plugin: powertable.
"""
powerTable = plugins.powerTable
powerTable.dtfeatures['sScrollY'] = '338'
powerTable.dtfeatures['sScrollX'] = '120%'
powerTable.headers = 'fieldname:capitalize'
powerTable.showkeycolumn = False
powerTable.uitheme = request.vars.get('theme','redmond')#'smoothness' /
'redmond' /'cupertino'
powerTable.dtfeatures['sPaginationType'] =
request.vars.get('pager','scrolling')
powerTable.dtfeatures['bScrollCollapse'] = True
powerTable.dtfeatures['bScrollInfinite'] = True
powerTable.dtfeatures['iScrollLoadGap'] = 10
powerTable.dtfeatures['bAutoWidth'] = True
powerTable.dtfeatures['bLengthChange'] = True
powerTable.dtfeatures['bProcessing'] = True
powerTable.dtfeatures['iDisplayLength'] = 18
powerTable.dtfeatures['iDisplayStart'] = 0
powerTable.dtfeatures['asStripClasses'] = ['odd','even']
powerTable.columnsearch = False
return (powerTable)
def skrywerdetails():
"""
Receives:
'outeur' in tablename
'id' in fieldname'
the id value in value
column names in cols
"""
#Key Processing
art_id = None
art_id = request.vars['dt_1'].split('.')[-1]
print request.vars
print art_id
#create a DIV to wrap the return
obj = DIV()
obj.append(SQLTABLE(db((db.outeur_art_ekw.artikel == art_id)&
(db.outeur.id ==
db.outeur_art_ekw.skrywer)).select(db.outeur.ALL)))
# return locals(), which has only one object 'obj'
return obj
@auth.requires_login()
def artikels():
# some pagination stuff removed
query = db.artikel.id > 0
powerTable = pwrtable()
powerTable.datasource = db(query).select(db.artikel.id,
db.artikel.outeur_id,
db.artikel.instansie_id,
db.artikel.joernaal_id,
db.artikel.titel,
limitby=limitby)
powerTable.keycolumn = 'artikel.id'
powerTable.showkeycolumn = True
powerTable.extra = dict(autoresize={},
tooltip={},
details={'detailscallback':URL('default','skrywerdetails')
})
records = powerTable.create()
return dict(data = records, query=query, opskrif = opskrif,
total_found=total_found,page=page,
items_per_page=items_per_page,
pages=pages, add = add)
--
May grace and peace be yours in abundance through the full knowledge of God
and of Jesus our Lord! His divine power has given us everything we need for
life and godliness through the full knowledge of the one who called us by
his own glory and excellence.
2 Pet. 1:2b,3a