PDA

View Full Version : How to get get chart on a panel following mvc model



enjetek
25 Mar 2012, 8:07 AM
Here is some code I am currently trying to make work. I was given code by another person on this board to display a data grid, and was able to make run it properly, but I am now trying to adapt the code to display a chart andI am running into issues. There are no errors in firebug so I cannot figure out why there is nothing being displayed on the page.

Thanks,
Mike

mankz
25 Mar 2012, 8:44 AM
Using ext-all-dev.js?

enjetek
25 Mar 2012, 8:53 AM
I have this in my html file...



<!DOCTYPE html>
<html>
<head>
<title>Parameters</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css">
<script type="text/javascript" src="extjs/ext-all-debug.js"></script>
<!--
<script type="text/javascript" src="extjs/ext-all.js"></script>
-->
<link rel="stylesheet" href="resources/style.css" type="text/css">
<script type="text/javascript" src="app3.js"></script>
</head>
<body></body>
</html>


Thanks,
Mike

mankz
25 Mar 2012, 9:03 AM
So try using ext-all-dev.js

enjetek
25 Mar 2012, 2:52 PM
That js file is a lot more helpful since it shows you what the specific message is. So apparently this is part of the error:

[E] The specified callback function is undefinedlog (message="[E] The specified callback function is undefined")ext-all-dev.js (line 9405)raise()ext-all-dev.js (line 8709)err = Object { sourceMethod="addListener", msg="The specified callback function is undefined"}addListener(fn=undefined, scope=Object { application={...}, id="Chart", events={...}, more...}, options=Object {})ext-all-dev.js (line 17334)(?)(ev="render", listener=undefined)ext-all-dev.js (line 36906)each(object=Object {}, fn=function(), scope=undefined)ext-all-dev.js (line 3072)(?)(selector="viewport > panel", listeners=Object {})ext-all-dev.js (line 36892)each(object=Object { viewport > panel={...}, listeners={...}, onPanelRendered=function()}, fn=function(), scope=undefined)ext-all-dev.js (line 3072)Ext.app.EventBus#control(selectors=Object { viewport > panel={...}, listeners={...}, onPanelRendered=function()}, listeners=undefined, controller=Object { application={...}, id="Chart", events={...}, more...})ext-all-dev.js (line 36891)Ext.app.Application#control(selectors=Object { viewport > panel={...}, listeners={...}, onPanelRendered=function()}, listeners=undefined, controller=Object { application={...}, id="Chart", events={...}, more...})ext-all-dev.js (line 59973)Ext.app.Controller#control(selectors=Object { viewport > panel={...}, listeners={...}, onPanelRendered=function()}, listeners=undefined)ext-all-dev.js (line 30903)ChartApp.controller.Chart#init()Chart....5857842 (line 42)(?)()ext-all-dev.js (line 59965)createSingle()ext-all-dev.js (line 17312)fire()ext-all-dev.js (line 17461)onDocumentReady(fn=function(), scope=Object { name="ChartApp", controllers={...}, appFolder="app", more...}, options=Object { single=true})ext-all-dev.js (line 17620)fn()ext-all-dev.js (line 8291)triggerReady(force=undefined)ext-all-dev.js (line 8266)refreshQueue()ext-all-dev.js (line 7839)refreshQueue()ext-all-dev.js (line 7870)refreshQueue()ext-all-dev.js (line 7870)refreshQueue()ext-all-dev.js (line 7870)onFileLoaded(className="ChartApp.model.Chart", filePath="app/model/Chart.js")ext-all-dev.js (line 8162)(?)()ext-all-dev.js (line 2454)onLoadFn()ext-all-dev.js (line 7888)
con[level](message);

Does this mean I need to implement some type of listener for the Chart object being created?

Thanks,
Mike