I have already corrected that - sorry for the confusion...

On Jul 20, 10:23 am, Roberto Perdomo <[email protected]> wrote:
> i think that you code is wrong, try with:
>
> return dict( ownedByUser = ownTable.create(), sharedWithUser
> = sharedWithUser.create() )
>
> you were doubling ownTable on the dict.
>
> 2011/7/20 Chris Baron <[email protected]>
>
>
>
>
>
>
>
> > I'm still having a problem getting two powertables on one page.  If I
> > comment out the code for the second powertable, everything is fine,
> > but it seems the first powertable can't find its data.  Please refer
> > to code posted above.  I think this has something to do with
> > instantiation, specifically, I think that this is my problem :
>
> >    ownTable = plugins.powerTable
> >    # do stuff with ownTable
>
> >    shareTable = plugins.powerTable
> >     #do stuff with shareTable
>
> >    return dict( ownedByUser = ownTable.create(), sharedWithUser =
> > ownTable.create() )
>
> > How do I get separate instances?
>
> > On Jul 20, 9:40 am, Chris Baron <[email protected]> wrote:
> > > Thank you for the prompt responses.
>
> > > On Jul 19, 4:12 pm, Roberto Perdomo <[email protected]> wrote:
>
> > > > Hello, it's me again.
>
> > > > Well, I discovered that the problem of loading the table with "load" is
> > in
> > > > the event "live" plugin_powertable.py. I've replaced the event "live"
> > for
> > > > "bind", and, works, but just load the details for the first 10 rows
> > > > displayed when loading the table.
>
> > > > Is there any way to fix this error?
>
> > > > thanks
> > > > 2011/7/19 Bruno Rocha <[email protected]>
>
> > > > > this should be:
>
> > > > > table.dtfeatures['aoColumns'] = ''
>
> > > > > dtfeatures implement any option from datatables.net
>
> > > > > On Tue, Jul 19, 2011 at 1:32 PM, Christopher Baron <
> > [email protected]
> > > > > > wrote:
>
> > > > >> Does anyone know where, what to set the 'aoColumns' property to ?
>
> > > > >> The documentation for this plugin is not helpful...
>
> > > > >> On Jul 18, 1:25 pm, Roberto Perdomo <[email protected]> wrote:
> > > > >> > I now discover that only show the details only for the first 10
> > records.
>
> > > > >> > I send you to your mail my app, because is very hevy for the group
> > mail.
>
> > > > >> > 2011/7/18 Bruno Rocha <[email protected]>
>
> > > > >> > > include ownTable._id = "something" and ownTable._class =
> > "something"
> > > > >> to set
> > > > >> > > different class and id to the tables.
>
> > > > >> > > On Mon, Jul 18, 2011 at 12:57 PM, Chris Baron <
> > [email protected]
> > > > >> >wrote:
>
> > > > >> > >> How do you do it ?
>
> > > > >> > >> Here is my controller :
>
> > > > >> > >> ownDataSource = db( db.gtree.contributor == '
> > > > >> > >> '.join( [ auth.user.first_name, auth.user.last_name ] )
> > ).select()
>
> > > > >> > >>    class ownVirtualFields(object):
> > > > >> > >>        @virtualsettings(label='Tree')
> > > > >> > >>        def tree_url(self):
> > > > >> > >>            gtree = self.gtree.id
> > > > >> > >>            u = URL(c="gtree",f="view",args=self.gtree.id,
> > > > >> > >> vars=dict(treeType='grafted'))
> > > > >> > >>            return A('grafted', _href=u)
>
> > > > >> > >>    ownTable = plugins.powerTable
> > > > >> > >>    ownTable.datasource = ownDataSource
> > > > >> > >>    ownTable.dtfeatures["sScrollY"] = "200px"
> > > > >> > >>    ownTable.dtfeatures["sScrollX"] = "100%"
> > > > >> > >>    ownTable.virtualfields = ownVirtualFields()
> > > > >> > >>    ownTable.headers = "labels"
> > > > >> > >>    ownTable.showkeycolumn = False
> > > > >> > >>    ownTable.dtfeatures["bJQueryUI"] =
> > > > >> > >> request.vars.get("jqueryui",True)
> > > > >> > >>    ## ownTable.uitheme = request.vars.get("theme","cupertino")
> > > > >> > >>    ownTable.uitheme = request.vars.get("theme","smoothness")
> > > > >> > >>    ownTable.dtfeatures["iDisplayLength"] = 25
> > > > >> > >>    ownTable.dtfeatures["aaSorting"] = [[6,'desc']]
> > > > >> > >>    ownTable.dtfeatures["sPaginationType"] = request.vars.get(
> > > > >> > >>        "pager","full_numbers"
> > > > >> > >>        ) # two_button scrolling
> > > > >> > >>    ownTable.columns = ["gtree.id",
> > > > >> > >>                          "virtual.tree_url",
> > > > >> > >>                          "gtree.mtime",
> > > > >> > >>                          "gtree.title",
> > > > >> > >>                          "gtree.comment" ]
>
> > > > >> > >>    ownTable.extra = dict(autoresize=True)
>
> > > > >> > >>    ####
>
> > > > >> > >>    uniqueUserId = db( db.user_map.auth_user_id ==
> > > > >> > >> auth.user.id ).select()[0].unique_user_id
>
> > > > >> > >>    shareDataSource = db( ( db.gtree.id == db.gtree_share.gtree
> > ) &
> > > > >> > >>                          ( db.gtree_share.user ==
> > > > >> > >> uniqueUserId ) ).select()
>
> > > > >> > >>    class shareVirtualFields(object):
> > > > >> > >>        @virtualsettings(label='Tree')
> > > > >> > >>        def tree_url(self):
> > > > >> > >>            gtree = self.gtree.id
> > > > >> > >>            u = URL(c="gtree",f="view",args=self.gtree.id,
> > > > >> > >> vars=dict(treeType='grafted'))
> > > > >> > >>            return A('grafted', _href=u)
> > > > >> > >> shareTable = plugins.powerTable
> > > > >> > >>    shareTable.datasource = shareDataSource
> > > > >> > >>    shareTable.dtfeatures["sScrollY"] = "200px"
> > > > >> > >>    shareTable.dtfeatures["sScrollX"] = "100%"
> > > > >> > >>    shareTable.virtualfields = shareVirtualFields()
> > > > >> > >>    shareTable.headers = "labels"
> > > > >> > >>    shareTable.showkeycolumn = False
> > > > >> > >>    shareTable.dtfeatures["bJQueryUI"] =
> > > > >> > >> request.vars.get("jqueryui",True)
> > > > >> > >>    ## shareTable.uitheme =
> > request.vars.get("theme","cupertino")
> > > > >> > >>    shareTable.uitheme = request.vars.get("theme","smoothness")
> > > > >> > >>    shareTable.dtfeatures["iDisplayLength"] = 25
> > > > >> > >>    shareTable.dtfeatures["aaSorting"] = [[6,'desc']]
> > > > >> > >>    shareTable.dtfeatures["sPaginationType"] = request.vars.get(
> > > > >> > >>        "pager","full_numbers"
> > > > >> > >>        ) # two_button scrolling
> > > > >> > >>    shareTable.columns = ["gtree.id",
> > > > >> > >>                          "virtual.tree_url",
> > > > >> > >>                          "gtree.mtime",
> > > > >> > >>                          "gtree.title",
> > > > >> > >>                          "gtree.comment" ]
>
> > > > >> > >>    shareTable.extra = dict(autoresize=True)
>
> > > > >> > >>    return dict( ownedByUser = ownTable.create(), sharedWithUser
> > =
> > > > >> > >> ownTable.create() )
>
> > > > >> > >> Here is my view :
>
> > > > >> > >> <div class="blackBorder width98 fullHeight">
>
> > > > >> > >>    <div style="height:50%; overflow:auto;">
> > > > >> > >>        <div class="centerText" style="font-size:x-large;
> > padding:
> > > > >> > >> 10px;">Grafted Tables You Own</div>
> > > > >> > >>        {{=ownedByUser}}
> > > > >> > >>    </div>
>
> > > > >> > >>    <div style="height:50%; overflow:auto;">
> > > > >> > >>        <div class="centerText" style="font-size:x-large;
> > padding:
> > > > >> > >> 10px;">Grafted Tables Shared With You</div>
> > > > >> > >>        {{=sharedWithUser}}
> > > > >> > >>    </div>
>
> > > > >> > >> </div>
>
> > > > >> > > --
>
> > > > >> > > --
> > > > >> > > Bruno Rocha
> > > > >> > > [ About me:http://zerp.ly/rochacbruno]
> > > > >> > > [ Aprenda a programar:http://CursoDePython.com.br]
> > > > >> > > [ O seu aliado nos cuidados com os animais:
> >http://AnimalSystem.com.br
> > > > >> ]
> > > > >> > > [ Consultoria em desenvolvimento web:http://www.blouweb.com]
>
> > > > > --
>
> > > > > --
> > > > > Bruno Rocha
> > > > > [ About me:http://zerp.ly/rochacbruno]
> > > > > [ Aprenda a programar:http://CursoDePython.com.br]
> > > > > [ O seu aliado nos cuidados com os animais:
> >http://AnimalSystem.com.br]
> > > > > [ Consultoria em desenvolvimento web:http://www.blouweb.com]

Reply via email to