Forum


21:07

23/10/2009

Thanks to all of you that have helped with this! It is finally working! Hallelujah!!
I will be adding to the prototype I have now and am sure I will be asking for help in the future. The Jquery widget tools are just too good not to use with Turbogears.
I will continue to monitor this forum.
Thanks again.
22:29

23/10/2009

andrewwatts said:
Post edited 08:01 – 19/11/2009 by andrewwatts
Post edited 08:03 – 19/11/2009 by andrewwatts
Post edited 08:04 – 19/11/2009 by andrewwatts
Hello Ed, we spoke in the TG forum about this issue and I just stumbled on your posts here.
Now that I've seen your code I can say a bit more and I believe you need to go back and double check all your script and css paths. If you followed the instructions at /jqgridwiki/doku.php?id=wiki:jquery_ui_intro you'll notice that you are missing the jquery ui script file and also that your locale file is in the wrong place (at least according to the installation).
I copied and pasted the code from your first post of this thread and get the error you describe. I fixed the js paths for my environment and the errors went away and the grid successfully renders. Here is a diff of what I changed (lines that begin with '-' are your original code, lines that begin with '+' are how I changed them)
<title>Sensadata 2.0</title>
-<link rel=”stylesheet” type=”text/css” media=”screen” href=”css/redmond/jquery-ui-1.7.1.custom.css” />
+<link rel=”stylesheet” type=”text/css” media=”screen” href=”css/jquery-ui-1.7.2.custom.css” />
<link rel=”stylesheet” type=”text/css” media=”screen” href=”css/ui.jqgrid.css” />
<script src=”js/jquery-1.3.2.min.js” type=”text/javascript”></script>
-<script src=”i18n/grid.locale-en.js” type=”text/javascript”></script>
+<script type=”text/javascript” src=”/js/jquery-ui-1.7.2.custom.min.js”></script>
+<script src=”js/i18n/grid.locale-en.js” type=”text/javascript”></script>
<script src=”js/jquery.jqGrid.min.js” type=”text/javascript”></script>
<script type=”text/javascript”>
jQuery(document).ready(function(){Also, if it helps, here are the TG controller methods I used to test with.
@expose('ui.templates.grid1')
def grid(self, *args, **kwargs):
return dict()
@expose('json')
def grid1(self, *args, **kwargs):
a_dict = {'records': '5',
'total': '1',
'rows': [{'cell': ['10009901', '0', '"11024438"', 'None'], 'id': '279976'},
{'cell': ['10009901', '0', '"11014912"', 'None'], 'id': '279977'},
{'cell': ['10009901', '4423', '"11024421"', 'None'], 'id': '279978'},
{'cell': ['10009901', '4425', '"11014910"', 'None'], 'id': '279979'},
{'cell': ['12194001', '0', '"11083108"', '0'], 'id': '279975'}],
'page': '1'}
return a_dictAgain, simply updating the javascript src includes for my environment successfully rendered a chart using the rest of your code.
Hope this helps.
- Andrew
I have been working on other things and am now back to sorking on this section of my application. I had some selection fields on the top of the grid and moved them to a prior page.
The user selects the date and type of transaction, on submit the grid page is called. The issue now is really a Turbogears thing. If I have:
@expose('json')
def griddisplay:
......select data
return dict(....... proper form)
I get the data and no HTML.
If I change the @expose('jason') to @expose(template.name), I get the HTLM with no data.
How do I get both?
Most Users Ever Online: 715
Currently Online:
102 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66