PDA

View Full Version : Form with Ext.nd Alpha 2



tarikonen
17 Jul 2007, 1:29 AM
Hi, sorry for my silly question, how can i create an Ext.nd form? I have already created a form in my test DB and i have linked it in the outline that is rendered with Ext.Nd (sorry for my poor english) but when i open the form it appear like a normal html form.

Thank to all
Alex

jratcliff
17 Jul 2007, 5:23 AM
It's not a silly question at all. We forgot to put a sample form into the db.

Here's what the JS Header should look like:


Ext.onReady(function() {
var frm = new Ext.nd.Form();
frm.render();
});


And the HTML Head should look like this:


dbPath := "/" + @WebDbName + "/";
ServerName := @If(@TextToNumber(@Version) < 190; @Subset(@DbName;1); @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' />"


You can take out the references to 'mode' if you want. We just use that as an easy way to load the -debug.js versions of the js files.

Let me know if this works for you and sorry again for not including a sample form in the db.

~JR

tarikonen
17 Jul 2007, 5:47 AM
It work!!!!!

Good, this is a start point for me....

Thank you jratcliff

bprado
17 Jul 2007, 7:18 AM
Another silly question, this work in Lotus Domino 6.5 ???

Is Because i have 3 Domino Server, and 1 have Percussion Power Flow, but to put that in Domino 7.0 i have to change the powerflow engine, but i dont want to do that, right now!!!

RWaters
17 Jul 2007, 10:23 AM
Everything should work in 6.5... I don't have a server around to test for sure right now, but I don't believe we use anything specific to 7.

Zakaroonikov
17 Jul 2007, 3:19 PM
Should the line reading:




"<script type='text/javascript' src='" + dbPath + "($Ext.nd.SwitchForm)/" + unid +
"?OpenDocument&form=Ext.nd.UIDocument'></script>" + @NewLine +



Instead show:



"<script type='text/javascript' src='" + dbPath + uidoc +"'></script>" + @NewLine +


I had to make that change to get new documents to work

jratcliff
17 Jul 2007, 6:47 PM
Should the line reading:


Instead show:



"<script type='text/javascript' src='" + dbPath + uidoc +"'></script>" + @NewLine +


I had to make that change to get new documents to work

Yes, good catch. =D>

I'll make sure the sample form is updated AND included this time with the Ext.nd db. :)

bprado
18 Jul 2007, 6:36 AM
Yes, good catch. =D>

I'll make sure the sample form is updated AND included this time with the Ext.nd db. :)

Can you tell us, when this will be update in the sample database?

THK!!! :D

bprado
18 Jul 2007, 8:12 AM
I get this error when making a new form

Line: 138
Character: 248
Error: 'form' is null or not an object
Code: 0

I put the code in JS Header and HTML Head Content

jratcliff
18 Jul 2007, 9:49 AM
I get this error when making a new form

Line: 138
Character: 248
Error: 'form' is null or not an object
Code: 0

I put the code in JS Header and HTML Head Content

You have to make the change in the HTML Head section that Zakaroonikov found. I've updated the original post with the HTML Head section corrected now so you can recopy that code if you wish.

~JR

bprado
18 Jul 2007, 12:05 PM
Ok, thk, is working now!!
Where i can see the new things that i can do with forms and ext.nd ??

bawitdaba
10 Aug 2007, 8:49 PM
I got this to work by copying some left out items.

You need to copy the folder ($Ext.nd.SwitchForm) from Ext.nd to your database.
Also, you need to copy the form Ext.nd.UIDocument from Ext.nd to your database.

I did this and it worked, there might be a better way of doing this, but it worked for me

One bug that i do notice, is that no matter the notes background, the css style or the background set in the body tag the background is always white, always. It flickers when loading or refreshing the document but it always goes back to white.... other then that AMAZING job with this (tables and gradient cells dont seem to look anything like notes but im sure i can fix that up with some css)

jratcliff
11 Aug 2007, 6:07 AM
I got this to work by copying some left out items.

You need to copy the folder ($Ext.nd.SwitchForm) from Ext.nd to your database.
Also, you need to copy Ext.nd.UIDocument from Ext.nd to your database.

I did this and it worked, there might be a better way of doing this, but it worked for me

One bug that i do notice, is that no matter the notes background, the css style or the background set in the body tag the background is always white, always. It flickers when loading or refreshing the document but it always goes back to white.... other then that AMAZING job with this (tables and gradient cells dont seem to look anything like notes but im sure i can fix that up with some css)

You did the right thing. I just forgot to include that info in the "using document" of the db. Sorry about that. I hate that we have to put any new design elements into a database but for some things we can't think of any other way (well, except for writing a bunch of agents I guess, and I've tried to stay away from doing that as much as possible because of scalability issues...I wonder if Domino 7 is any better in terms of the agent performance and scalability)

Anyway, I'll talk to Rich about seeing if we can create a separate help database for Ext.nd where we can better document setup instructions and include tutorials, etc.

bawitdaba
11 Aug 2007, 6:40 AM
You did the right thing. I just forgot to include that info in the "using document" of the db. Sorry about that. I hate that we have to put any new design elements into a database but for some things we can't think of any other way (well, except for writing a bunch of agents I guess, and I've tried to stay away from doing that as much as possible because of scalability issues...I wonder if Domino 7 is any better in terms of the agent performance and scalability)

Anyway, I'll talk to Rich about seeing if we can create a separate help database for Ext.nd where we can better document setup instructions and include tutorials, etc.

I don't mind copying a few elements here and there why right a gigantic complex agent when its just as simple to copy and paste. The help db or maybe even a wiki site would be a good idea, it is hard to keep up with the changes... Great work on the form tho, by far my most fav part of ext.nd