tarikonen
09-13-2007, 10:36 AM
I'm trying to put a grid that get data from a view in a form, but i receive this error
fn has no properties
EventManager(undefined, function(), true)ext-all.js (line 18)
onload(load )
The form have just a Text and a div <div id="vista"></div>
In the HTML Head Content i have put this code:
dbPath := "/" + @WebDbName + "/";
ServerName := @ServerName;
unid := @Text(@DocumentUniqueID);
extndUrl := @GetProfileField("Ext.nd.Profile"; "ExtNDDb"; ServerName);
mode := @If(@UrlQueryString("debug") = "true"; "-debug"; "");
uidoc := @If(@IsNewDoc;
"Ext.nd.UIDocument?ReadForm";
"($Ext.nd.SwitchForm)/" + unid + "?OpenDocument&form=Ext.nd.UIDocument");
"<!-- Ext JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "ext/adapter/ext/ext-base.js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "ext/ext-all" + mode + ".js'></script>" + @NewLine +
"<!-- Ext.nd JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "extnd/extnd-all" + mode + ".js'></script>" + @NewLine +
"<script type='text/javascript' src='" + dbPath + "Ext.nd.Session.js?ReadForm'></script>" + @NewLine +
"<script type='text/javascript'>" + @NewLine +
" Ext.nd.init({extndUrl : '" + extndUrl + "'});" + @NewLine +
"</script>" + @NewLine +
"<script type='text/javascript' src='" + dbPath + uidoc + "'></script>" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "ext/resources/css/ext-all.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "ext/resources/css/xtheme-aero.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "extnd/resources/css/domino.css' />"
and in the onLoad event i have put this code:
var DemoApp = function()
{
return {
init : function(){
var cm = new Ext.grid.ColumnModel([
{header: "Nome", width: 60, sortable: true, locked: true},
{header: "Cognome", width: 150, sortable: true},
{header: "Indirizzo", width: 100, sortable: true},
{header: "Data", width: 100, sortable: true}
]);
var ds = new Ext.data.JsonStore({
url: 'http://myserver.com:8088/test.nsf/BEA5990D8C0C77D8C125735500494FCB?ReadViewEntries&OutputFormat=JSON',
root: 'entrydata',
fields: [{name:'Nome', type:'string'},{name:'Cognome', type:'string'},{name:'Indirizzo', type:'string'}, {name:'DataNascita', type:'date'}]
});
var grid = new Ext.grid.Grid("vista", {
ds: ds,
cm: cm,
// selModel: mySelectionModel,
autoSizeColumns: true,
monitorWindowResize: false,
trackMouseOver: true
});
// set any options
grid.render();
} // init
} // return
}
Ext.onReady(DemoApp.init, DemoApp, true);
What's wrong?
Thanks to all in advance
fn has no properties
EventManager(undefined, function(), true)ext-all.js (line 18)
onload(load )
The form have just a Text and a div <div id="vista"></div>
In the HTML Head Content i have put this code:
dbPath := "/" + @WebDbName + "/";
ServerName := @ServerName;
unid := @Text(@DocumentUniqueID);
extndUrl := @GetProfileField("Ext.nd.Profile"; "ExtNDDb"; ServerName);
mode := @If(@UrlQueryString("debug") = "true"; "-debug"; "");
uidoc := @If(@IsNewDoc;
"Ext.nd.UIDocument?ReadForm";
"($Ext.nd.SwitchForm)/" + unid + "?OpenDocument&form=Ext.nd.UIDocument");
"<!-- Ext JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "ext/adapter/ext/ext-base.js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "ext/ext-all" + mode + ".js'></script>" + @NewLine +
"<!-- Ext.nd JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "extnd/extnd-all" + mode + ".js'></script>" + @NewLine +
"<script type='text/javascript' src='" + dbPath + "Ext.nd.Session.js?ReadForm'></script>" + @NewLine +
"<script type='text/javascript'>" + @NewLine +
" Ext.nd.init({extndUrl : '" + extndUrl + "'});" + @NewLine +
"</script>" + @NewLine +
"<script type='text/javascript' src='" + dbPath + uidoc + "'></script>" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "ext/resources/css/ext-all.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "ext/resources/css/xtheme-aero.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "extnd/resources/css/domino.css' />"
and in the onLoad event i have put this code:
var DemoApp = function()
{
return {
init : function(){
var cm = new Ext.grid.ColumnModel([
{header: "Nome", width: 60, sortable: true, locked: true},
{header: "Cognome", width: 150, sortable: true},
{header: "Indirizzo", width: 100, sortable: true},
{header: "Data", width: 100, sortable: true}
]);
var ds = new Ext.data.JsonStore({
url: 'http://myserver.com:8088/test.nsf/BEA5990D8C0C77D8C125735500494FCB?ReadViewEntries&OutputFormat=JSON',
root: 'entrydata',
fields: [{name:'Nome', type:'string'},{name:'Cognome', type:'string'},{name:'Indirizzo', type:'string'}, {name:'DataNascita', type:'date'}]
});
var grid = new Ext.grid.Grid("vista", {
ds: ds,
cm: cm,
// selModel: mySelectionModel,
autoSizeColumns: true,
monitorWindowResize: false,
trackMouseOver: true
});
// set any options
grid.render();
} // init
} // return
}
Ext.onReady(DemoApp.init, DemoApp, true);
What's wrong?
Thanks to all in advance