View Full Version : and where did I go wrong??
odishon
8 Sep 2008, 6:38 AM
I took the demo and created a new db, added the ext.nd and it worked.
So I then plucked another database and put the ext.nd on it.. no changes but just.. place the framework on it.
The outline and view works perfect. (ok, it is double categorized so ONE importent view don't). The actions turn into nice buttons and the view looks perfect.
I opened up the form "user" that is linked from the view and now the problem began. It is a tabbed table. and the tabs stay as ordinary cells with borders, the actions is also normal links in a box. Parts of the css seems to apply to the page since the table gets styled from the ext.nd.
And the close button, returns me to the notes view.
The problem.. don't know where to begin to bugfix.. and again, just put the ext.nd database beta 1 on it. No changes anywhere but to include the code on the HTML Head to load the ext.nd
jratcliff
8 Sep 2008, 8:06 AM
what does your code in the HTML Head of your form look like? As for Notes Tabbed tables, we don't yet do anything to convert those to Ext tabs.
odishon
17 Sep 2008, 5:42 AM
Yes.. I know that tabbing is not working.. as with categorized views.
I wonder if the tabbed table is what makes the "actions" as pure table.
The HTML-Head
thisWebDbName := @WebDbName;
extUrl := @GetProfileField("Ext.nd.Profile";"extUrl";@ServerName);
extndUrl := @GetProfileField("Ext.nd.Profile";"extndUrl";@ServerName);
mode := @If(@UrlQueryString("debug") = "true"; "-debug"; "");
unid := @If(@IsNewDoc;"";@Text(@DocumentUniqueID));
editMode := @If(@IsDocBeingEdited;"true";"false");
"<!-- Ext JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extUrl + "adapter/ext/ext-base.js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extUrl + "ext-all" + mode + ".js'></script>" + @NewLine +
"<!-- Ext.nd JS library -->" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "/extnd-all" + mode + ".js'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "Session.js?OpenAgent&db=" + thisWebDbName + "'></script>" + @NewLine +
"<script type='text/javascript' src='" + extndUrl + "UIDocument.js?OpenAgent&db=" + thisWebDbName + "&unid=" + unid + "&editmode=" + editMode + "'></script>" + @NewLine +
"<script type='text/javascript'>" + @NewLine +
" Ext.nd.init({extndUrl : '" + extndUrl + "', extUrl : '" + extUrl + "'});" + @NewLine +
"</script>" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extUrl + "resources/css/ext-all.css' />" + @NewLine +
"<link rel='stylesheet' type='text/css' href='" + extndUrl + "resources/css/domino.css' />"
The JS Header:
myView = new Ext.nd.UIView({
viewName: 'Users',
gridConfig: {
renderTo: 'notesView'
}
});
The same code usually gives me the actions with the ext.nd gui. Now it is just simple TD-tags with borders.
Could it be the tabbed table that screws with it? It's fine if the tabs is where they should be.
http://i33.tinypic.com/24cwcau.gif
When I then open it up in EDIT.. the actions don't behave "Ext.nd"..
http://i33.tinypic.com/2w2lijm.gif
jratcliff
17 Sep 2008, 8:28 AM
The HTML Head and JS Header code that you posted, is that for the profile form? If so, I don't see any Ext.nd code to handle the form and the form actions.
At the minimum you should have at least:
var frm = new Ext.nd.Form();
frm.render();
This will then convert the action bar into an Ext.Toolbar and will convert the form fields into Ext form fields.
odishon
18 Sep 2008, 4:38 AM
Basically.. all I did was to "steal" the code from the Ext.nd2 Demo database. I
There is a form CategoryTest1 and I ripped the HTMLHead code from there as well as part of the JS code on JSHeader
var frm = new Ext.nd.Form();
frm.render();
(removed the rest for "editMode").. and put that stuff in my user form. Then I "stole" the main.html from the demo2 db as well, modified the outline and stuff to my db.
8 of 9 times, opening the starting page results in a blank page and an error:
Error: Ext.nd.Session is undefined
Source: http://server/ABC/misc/extnd.nsf/extnd/2.0.1/extnd-all.js
Line: 21
Then the 9th time it works. When I navigate to the form I get the "tabbed table" tabs to look "like tabs" but the action bar still looks like a table. I get another error:
Error: sess is undefined
source: http://server/ABC/misc/extnd.nsf/extnd/2.0.1//extnd-all.js
Line: 147
I test to open up the form itself and I get the table look for the actions an as well, the "sess is undefined" error.
When I use the "back"-button and then forward, all of a sudden I get the ext.nd action look.
The ext.nd db is located on the same server but in a seperate folder.. and I guess the lesson learned is NOT to "borrow" code from a demo :)
Thx for the assistance.
jratcliff
18 Sep 2008, 5:49 AM
ok, the "sometimes works" and "sometimes doesn't work" sounds like you don't have your code in the JS Header wrapped in an Ext.onReady call.
For instance, the code snippet I posted earlier should be in an Ext.onReady call like this:
Ext.onReady(function() {
var frm = new Ext.nd.Form();
frm.render();
});
Or, if you prefer, you can define a variable and do it this way:
var yourApp = function() {
return {
init : function(){
var frm = new Ext.nd.Form();
frm.render();
} // init
} // return
}();
Ext.onReady(yourApp.init, yourApp, true);
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.