What is the value of request.vars.tabel and what is the definition of
the table you are showing?

On Nov 5, 8:36 am, Johann Spies <johann.sp...@gmail.com> wrote:
> On 5 November 2010 14:50, mdipierro <mdipie...@cs.depaul.edu> wrote:
>
> > Anyway... I m sure jqgrid works well in plugin_wiki. Either there is
> > an error in passing arguments to it or there is an issue with
> > permissions or there is a JS conflict.
>
> Well I am unable to find the cause of the  problem.
>
> This is in my controller:
>
> def teacher():
>     teachers=plugin_wiki.widget('jqgrid',table='teacher')
>     add= A("Add a teacher",_href=URL(r=request, c="default", f="add_teacher"))
>     return dict(teachers=teachers,add=add)
>
> and
>
> def show_data():
>        tabel = request.vars.tabel.lower()
>        data= plugin_wiki.widget('jqgrid',table=tabel)
>        return dict(data=data,tabel=tabel)
>
> I got data in the grid, can sort columns, page but the left bottom two
> icons on the grid is dead.
>
> I have removed all the other older plugins that can cause problems but
> that did not change anything.
>
> Then I reinstalled the latest plugin_wiki and now the 'teacher'  grid
> has a different background and does not show the bottom controls and
> the show_data ends with a ticket:
>
> Traceback (most recent call last):
>   File "/Users/js/Programmeer/zenex/web2py/gluon/restricted.py", line
> 188, in restricted
>     exec ccode in environment
>   File 
> "/Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py",
> line 952, in <module>
>   File "/Users/js/Programmeer/zenex/web2py/gluon/globals.py", line 96,
> in <lambda>
>     self._caller = lambda f: f()
>   File "/Users/js/Programmeer/zenex/web2py/gluon/tools.py", line 2264, in f
>     return action(*a, **b)
>   File 
> "/Users/js/Programmeer/zenex/web2py/applications/zenex2/controllers/default.py",
> line 801, in show_data
>     data= plugin_wiki.widget('jqgrid',table=tabel)
>   File 
> "/Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py",
> line 675, in widget
>     return getattr(PluginWikiWidgets,name)(*args,**kargs)
>   File 
> "/Users/js/Programmeer/zenex/web2py/applications/zenex2/models/plugin_wiki.py",
> line 280, in jqgrid
>     """ % dict(callback=callback,colnames=json(colnames),
>   File "/Users/js/Programmeer/zenex/web2py/gluon/serializers.py", line
> 31, in json
>     return simplejson.dumps(value)
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/__init__.py",
> line 228, in dumps
>     return _default_encoder.encode(obj)
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py",
> line 232, in encode
>     chunks = list(chunks)
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py",
> line 498, in _iterencode
>     for chunk in _iterencode_list(o, _current_indent_level):
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py",
> line 396, in _iterencode_list
>     for chunk in chunks:
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py",
> line 511, in _iterencode
>     o = _default(o)
>   File 
> "/Users/js/Programmeer/zenex/web2py/gluon/contrib/simplejson/encoder.py",
> line 206, in default
>     raise TypeError(repr(o) + " is not JSON serializable")
> TypeError:  is not JSON serializable
>
> Regards
> Johann
> --
>  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

Reply via email to