PDA

View Full Version : Saving Notes Document



raymond_w_chan
6 Jun 2007, 7:31 PM
Hi all,

I have used Ext.BorderLayout to create an interface for opening new notes document.
Everything looks good except when I try to save the document by calling "document.submit()", I have found that for fields which used in Ext.BorderLayout didn't save to notes document.

Could anyone help?

Many Thanks,
Raymond

galdaka
6 Jun 2007, 11:32 PM
eternal problem.

I not use Ext.nd. I use Ext 1.0. I use client 5.0.18 and Domino Server 6.5.3.

For principal forms in my application I not use Ext.form and Layouts, and I create forms like you see in picture.

I use Ext css classes for boxes and I create 2 simply css classes for 1 column box or 2 column box like this:


.x-form-1col {
float:left;
margin-left:10px;
margin-top:15px;
width:97%;
}
.x-form-2col {
float:left;
margin-left:10px;
margin-top:15px;
width:48%;
}

I create the toolbar buttons in a DIV.

mdm-adph
7 Jun 2007, 5:07 AM
This may be a silly question, but the fields you're trying to save were already created on the form in the Designer, right?

galdaka
10 Jun 2007, 9:47 AM
This may be a silly question, but the fields you're trying to save were already created on the form in the Designer, right?

yes

jratcliff
11 Jun 2007, 11:11 AM
Hi all,

I have used Ext.BorderLayout to create an interface for opening new notes document.
Everything looks good except when I try to save the document by calling "document.submit()", I have found that for fields which used in Ext.BorderLayout didn't save to notes document.

Could anyone help?

Many Thanks,
Raymond

What does your BorderLayout call look like? Does it look something like this?

var layout = new Ext.BorderLayout(document.body, {...

If so, then that's your problem. Domino automatically creates the html/body/form tags for you. When you tell BorderLayout to put everything under document.body then all of your markup AND fields get pulled OUT of the form tag. When a submit is then done, the browser won't submit those fields that are now no longer within the form tag.

You have a couple of options:

1) on your domino form, create an empty div and give it an id.

<div id='yourId'></div>
Then, change your BorderLayout code to look like so:

var layout = new Ext.BorderLayout('yourId', {...

2) (not tested but may work). Change your BorderLayout code to look like this (assuming you haven't closed domino's form tag and added another form tag)

var layout = new Ext.BorderLayout(document.getElementsByTagName('form')[0], {...

Let me know if this helps.

~JR

raymond_w_chan
15 Jun 2007, 12:00 AM
Thx for yours advices!

Hi Jratcliff,

Yes, I am using the BorderLayout call as you said:
var layout = new Ext.BorderLayout(document.body, {...

I have tried the 2nd method:
var layout = new Ext.BorderLayout(document.getElementsByTagName('form')[0], {...

but it returns an error:
"Invalid source HTML for this operation"

I haven't closed the form or added another form tag, I don't know if I missed anything.

Please forgive me that I am new to this Ext Lib and did some silly things.

Thx for your help!

Raymond

Joe
29 Jun 2007, 5:10 AM
See this post:
http://extjs.com/forum/showthread.php?t=3044

I had issues with the fact that domino adds the <-- comment style - which conflicts with the prestine nature of EXT. The server is sending out "old standards" and EXT only wants "new standards".

Hope that helps

jratcliff
29 Jun 2007, 5:50 AM
I have tried the 2nd method:
var layout = new Ext.BorderLayout(document.getElementsByTagName('form')[0], {...

but it returns an error:
"Invalid source HTML for this operation"

I'm doing this now in my environment and it works:



var frm = document.forms["_projectSetupP2"];
var layout = new Ext.BorderLayout(frm, {...


"projectSetupP2" is the name of the form when Domino generates the form tag it sets the name attribute to the form name but prepends the underscore.

I think document.forms[0] should also work and I'll try it later today to confirm.

~JR