Bruno, I would help you the best I can... I would like to focus on JSON where to start?
Do you have a app with the demo : products and category db? Thanks Richard On Mon, Jan 31, 2011 at 3:54 PM, Bruno Rocha <[email protected]> wrote: > Hi, > > I could not reproduce your model, but here it is my example app running, > plus I am sending attached web2py app, the newest version of the plugin and > some screenshots. > > > <MODEL> > db.define_table('category', > Field('name'), > ) > > db.define_table('product', > Field('category_id',db.category, > represent=lambda r:r.name, > requires=IS_IN_DB(db,db.category.id,'%(name)s')), > Field('name'), > Field('description'), > Field('price','double'), > Field('quantity','integer') > ) > </MODEL> > > <CONTROLLER> > def index(): > """ > Test powerTable > """ > table = plugins.powerTable > table.datasource = db.product > > table.keycolumn = 'product.id' > table.showkeycolumn = False > table.extra = dict( > details={'detailscallback':URL('*myfunction* > .load')} > ) > > table = table.create() > > return locals() > > > def *myfunction*(): > """ > return a custom object to be inserted in detail for table > """ > obj = DIV() > obj.append(H1('Title for my details')) > obj.append(SQLFORM(db.product)) > obj.append(SQLTABLE(db(db.category).select())) > obj.append(A('powertable',_href=' > http://bitbucket.org/rochacbruno/powertable')) > > # return locals(), which has only one object 'obj' > return locals() > </CONTROLLER> > > *Screenshots*: > > Table: http://awesomescreenshot.com/05d6rcxbc > > Expanded details: http://awesomescreenshot.com/0706rcv8b > > AjaxCallback: http://awesomescreenshot.com/08a6rd793 > > > > Demo app and newest plugin version in: > https://bitbucket.org/rochacbruno/powertable/downloads > (also attached to this message) > > *Note*: powerTable plugin is an alpha version, too much work in progress, > I am working to fix many issues people reported, any suggestion or help are > apreciated. > > Thanks > > -- > Bruno Rocha > http://about.me/rochacbruno/bio >

