PDA

View Full Version : Problems With Grid and Lotus Domino



jakehowl
23 Feb 2007, 9:02 AM
Hi All,

I am working at making the Ext play with Lotus Domino and it's proving harder than I expected. I'd got the Grid working with a Domino "View" in v 0.33 but am having trouble doing the same in 1.0a.


The first problem is we have to use GET to fetch Domino data from a view. Parameters such as start and "limit" have to be appended to the URL.

The Yahoo asyncRequest method only sends parameters when using POST. So, unless I edit the source code to Ext to append the params to this.url it won't work.

If I do append the params to the URL it all works as expected but then the paging fails as the PagingToolbar's method to open the first page has "start:0" hard-coded and so it doesn't work with Domino. Domino will only accept a missing start paramater or "&start=1" as meaning you want the first page. If you tell it start=0 then it returns nothing. Strange but true.

Now, obviously, you're aiming at the widest market here and some defined defaults are acceptable, but to reach a wider audience still it needs to cater for the oddities of platofrms like Domino.

Any suggestions what the best way to use GET for paging with the Grid is?

Jake

jratcliff
23 Feb 2007, 10:56 AM
Hi Jake,

What I have done to get this to work is to override the 'load' and 'loadPage' methods of the XMLDataModel Class (since I'm working with Domino's XML and not their JSON representation of views).


Ext.grid.XMLDataModel.prototype.load

Ext.grid.XMLDataModel.prototype.loadPage


Probably, you could do something like this:



DExt.Domino.XMLDataModel = function(schema, xml){
DExt.Domino.XMLDataModel.superclass.constructor.call(this, Ext.grid.XMLDataModel.XML);
/**@private*/
this.schema = schema;
this.xml = xml;
if(xml){
this.loadData(xml);
}
this.idSeed = 0;
};
Ext.extendX(DExt.Domino.XMLDataModel,Ext.grid.XMLDataModel, {

/**
* Loads a page of data.
* @param {Number} pageNum Which page to load. The first page is 1.
* @param {Function} callback (optional) Optional callback when loading is complete
* @param {Boolean} keepExisting (optional) true to keep existing data and append the new data
*/
loadPage: function(pageNum, callback, keepExisting){
var sort = this.getSortState();
var params = this.getDominoParams();
this.load(this.pageUrl, params, this.setLoadedPage.createDelegate(this, [pageNum, callback]),
keepExisting ? (pageNum-1) * this.pageSize : null);
},

/**
* Initiates the loading of the data from the specified URL - Failed load attempts will
* fire the {@link #loadexception} event.
* @param {Object/String} url The url from which the data can be loaded
* @param {String/Object} params (optional) The parameters to pass as either a url encoded string "param1=1&param2=2" or as an object {param1: 1, param2: 2}
* @param {Function} callback (optional) Callback when load is complete - called with signature (this, true for success, false for failure)
* @param {Number} insertIndex (optional) if present, loaded data is inserted at the specified index instead of overwriting existing data
*/
load: function(url, params, callback, insertIndex){
this.fireEvent('beforeload', this);
var cb = {
success: this.processResponse,
failure: this.processException,
scope: this,
argument: {callback: callback, insertIndex: insertIndex}
};
var method = 'GET'; // always a GET for Domino
this.transId = YAHOO.util.Connect.asyncRequest(method, url, cb, params);
},

/**
* Get the Domino View Params such as:
* - start
* - startkey
* - untilkey
* - count
* - restricttocategory.
*/
getDominoParams: function(){
// your custom method to get the domino params
},
.
.
.
.

}

jakehowl
23 Feb 2007, 12:38 PM
What I have done to get this to work is to override the 'load' and 'loadPage' methods of the XMLDataModel Class

Hi Jack. Fancy seeing you in here :D

Isn't the XMLDataModel class in 0.33 only? I had it working fine in 0.33, but am having trouble with the new alpha 1 release. The trouble seems to be that params aren't sent as part of the URL if you use GET.

If possible I want to avoid over-riding anything I don't have to as it's bound to lead to problems furhter down the line...

Jake

jratcliff
23 Feb 2007, 1:34 PM
Fancy seeing you here as well!

In the Ext 1.0 download that I have, it is in the /data/XMLDataModel.js file.

You are right about over-riding methods in the base classes that come with Ext. You don't want to do that and in my implementation, I need to refactor my code to not do that.

However, what I was trying to say is that in your OWN custom class that inherit from XMLDataModel or JSONDataModel, you can safely over-ride these methods for your own custom implementation.

So, for instance, I have custom classes called DominoViewXMLDataModel and DominoOutlineXMLDataModel that will inherit from XMLDataModel and in these classes I will define the load and loadPage methods to handle the XML from Domino Views and Outlines.

Since you are working with JSON from Domino and not XML, you could have custom classes called DominoViewJSONDataModel and DominoOutlineJSONDataModel that inherit from JSONDataModel and in these classes you can define a load and loadPage method to handle the JSON from Domino Views and Outlines.

I'm in no way an expert on this. So this is just how "I think" it should be done. :wink: :wink: :wink:

jack.slocum
23 Feb 2007, 2:29 PM
Did you try adding method: 'get' to your HttpProxy config? This should do it for you.

jratcliff
23 Feb 2007, 2:34 PM
Jack, why do you make things so easy! Thanks!

jack.slocum
23 Feb 2007, 2:45 PM
It's not so easy when it's not documented. Then it's like there are magic config options everywhere! I will be working on that soon.

jakehowl
23 Feb 2007, 2:58 PM
Did you try adding method: 'get' to your HttpProxy config? This should do it for you.

Hi Jack (Slocum)

Yes, after some reverse engineering I figured this out and added this config setting. This got the connection to use GET but it won't pass any of the params to the URL. If I switch back to POST all the right params are POSTed, so I know they're there.

Should it work in theory then? If you tell me it should I'll spend some more time trying to hack at it and work out what's broken.

I got as far as the YAHOO asyncRequest documentation which states that the passed params are only used for POST requests. Is this the case? It worked with 0.33.

Jake

jakehowl
23 Feb 2007, 3:06 PM
It worked with 0.33.

Tell a lie. I just looked at my working code and noticed this hack:


this.transId = YAHOO.util.Connect.asyncRequest('GET', url+"&"+params, cb, params);

So, I've added the params to the URL in my own class. In this case URL would be something like:

/tickets?ReadViewEntries

So it didn't really work with 0.33 at all.

Is there no way to get params (and so the Grid) to work with GET requests?

Jake

jack.slocum
24 Feb 2007, 5:38 AM
Jake I added in a workaround for you in the next rev. Here's what it looks like if you want to paste it in for now.


request : function(options){
if(this.fireEvent("beforerequest", this, options) !== false){
var p = options.params;
if(typeof p == "object"){
p = Ext.urlEncode(Ext.apply(options.params, this.extraParams));
}
var cb = {
success: this.handleResponse,
failure: this.handleFailure,
scope: this,
argument: {options: options},
timeout : this.timeout
};
var method = options.method||this.method||(p ? "POST" : "GET");
var url = options.url || this.url;
if(this.autoAbort !== false){
this.abort();
}
if(method == 'GET' && p){
url += (url.indexOf('?') != -1 ? '&' : '?') + p;
p = '';
}
this.transId = Ext.lib.Ajax.request(method, url, cb, p);
}else{
if(typeof options.callback == "function"){
options.callback.call(options.scope||window, options, null, null);
}
}
}

Please let know if this works as expected.

RWaters
24 Feb 2007, 5:47 AM
Hey, there's some familiar looking faces :)

Guess I may be a bit late on this, but it is tested and works fine.

var proxy = new Ext.data.HttpProxy({
url: parentURL,
method: "GET"
});
proxy.conn.on('beforerequest',function(e,opts) { this.url += "&"+Ext.urlEncode(opts.params); });

jratcliff
24 Feb 2007, 12:29 PM
My mistake, I wasn't looking in the right place. Ext 1.0 does NOT have XMLDataModel. However, looks like you guys got it sorted out anyway. :D

RWaters
24 Feb 2007, 12:45 PM
After some further testing changing pages continues to append those parameters, so either we'll need Jack's modification or we'll need to strip out and re-append the correct params each time.

jakehowl
24 Feb 2007, 1:59 PM
Please let know if this works as expected.

Hi Jack.

That change is pretty much what I'd done in my own version of the connection class. Much prefer not having to do this though. Plus you code makes mine look more than a little amateurish :o


url = options.url || this.url;
//If using GET add our params to the end of the URL
url = (method.toLowerCase()=="get")? url+"&"+p:url;

this.transId = YAHOO.util.Connect.asyncRequest(method, url , cb, p);

Thanks for taking this change on board. I know it will make it easier for us Domino developers to work with the grid.

Jake

RWaters
24 Feb 2007, 2:26 PM
I've been spending quite a bit of time on the grid and ended up writing a quick post on some of the fixes to isses with parameters and paging controls.

http://www.rich-waters.com/blog/2007/02/ext-10-progress.html

jack.slocum
24 Feb 2007, 5:39 PM
That's great RWaters. When we get the new site all set up, would you guys mind helping if we created a section dedicated to Domino?

RWaters
24 Feb 2007, 6:13 PM
Hey Jack, I'd be glad to help out with a Domino section. It happens that the three of us posting are all working on various integration frameworks / OpenNTF projects.

- Rich

RWaters
24 Feb 2007, 7:04 PM
Looks like you incorporated your fix for parameters on "GET" above into the Alpha 2 release. Just wanted to verify that it does work (and removes the need for my work around :) )

jakehowl
25 Feb 2007, 9:43 AM
That's great RWaters. When we get the new site all set up, would you guys mind helping if we created a section dedicated to Domino?

I'd be more than happy to help Jack.

Domino is an odd beast of a platform and very stuck in its way. It's amazingly powerful but also a pain to work with and quite unlike anything else out there - hence the need to use GET rather than POST. That said there's a massive corporate user base out there and there's almost definitely a business incentive to cater for it.

I've switched to Alpha 2 and your fix has worked, meaning I no longer need my own hacked copy of connection.js.

This just leaves the problem with start=0 in the PagingToolbar class. This breaks Domino-based grids as it only like either no start parameter or start=1 to tell it to start at the beginning.

Again I'd prefer not to have to hack your wonderful code and duplicate the class simply to change a fews 0s to 1s. Any chance this could be a config option? Pretty please ;o)

Jake

vajra
25 Feb 2007, 9:53 AM
You can count me in to help with the Domino documentation too ...

Eli

jratcliff
25 Feb 2007, 11:30 AM
Well, I'll throw my hat in the ring and say I'll help as well. Ext has got a lot of developers in the Domino community pretty excited. IBM hasn't done much for Domino developers in regard to UI widgets that work in the browser. They have a team dedicated to improving their web based mail client, but nothing for the developers that build custom applications. Ext has been a perfect fit. And like Rich and Jake said, there are at least 3 projects now dedicated to integrating Ext with Domino so developers will finally have a framework to build web-based Domino Applications. Oh, and I forgot that there is even an effort to build a web-based IDE for Domino that is using Ext as well. It is called XIDED.

So, what we have (that I know of) in the Domino community around Ext are:

Domino YUI http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/Domino%20YUI
- Rich Waters http://www.rich-waters.com/blog/
- Niel Revelle (I think is working on Domino YUI)
- Eli Harris (I think is working on Domino YUI)

DEXT (Domino Ext)
- Jake Howlett http://codestore.net

DWT (Domino Web Tools) http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/Domino%20Web%20Tools
- Jack Ratcliff http://jackratcliff.com

XIDED http://xided.com
- Tim Tripcony http://www.timtripcony.com/

jratcliff
25 Feb 2007, 11:41 AM
For those interested, here's an online demo of DWT. On the left is a normal domino outline and on the right is a normal domion view.

http://jackratcliff.com/jratcliff/dwt/dwt-demo.nsf/main.html

Outlines
- work pretty but I do need to add the option to display custom icons

Views
- flat views are supported
- views with docs that contain readers fields are support (so paging works even if you can't see all of the documents in a view due to readers fields
- sorts defined on columns works
- chage to view defined on columns works
- display values as icons works
- categoried views and views with response docs are not yet supported
- multi-value columns are not yet supported (but with Ext 1.0, this should be doable)
- view action bar not yet supported

galdaka
25 Feb 2007, 12:56 PM
For those interested, here's an online demo of DWT. On the left is a normal domino outline and on the right is a normal domion view.

http://jackratcliff.com/jratcliff/dwt/dwt-demo.nsf/main.html

Outlines
- work pretty but I do need to add the option to display custom icons

Views
- flat views are supported
- views with docs that contain readers fields are support (so paging works even if you can't see all of the documents in a view due to readers fields
- sorts defined on columns works
- chage to view defined on columns works
- display values as icons works
- categoried views and views with response docs are not yet supported
- multi-value columns are not yet supported (but with Ext 1.0, this should be doable)
- view action bar not yet supported

Your work is based on yui-ext 0.40? you will migrate to Ext 1.0? With your outline i view customs icons, the code is here: http://www.jackslocum.com/forum/viewtopic.php?t=2993&highlight=domino

In my case I like to have the codes separately and not to mix them in framework for Domino.

Any example to charge notes view via ?Readviewentries method with Ext 1.0?

jratcliff
25 Feb 2007, 2:05 PM
galdaka,

I'm currently working on Ext with Domino Views and Outlines. Jake http://codestore.net and Rich http://www.rich-waters.com/blog/ are as well. I'm not sure when they'll have something posted but I plan to have DWT working with Ext 1.0 by next weekend (3/4) and maybe sooner if I find the time this week.

I agree about having a separate class for reading domino xml data from a view. My next release will have a DominoViewXmlReader and a DominoOutlineXmlReader class that extends the XmlReader class. I believe that Jake and Rich have chosen to work with JSON data instead of XML so they'll have a different custom class(es) for that.

Oh, I checked out the thread you linked too. It's cool to see more Domino people working with Ext. I hope that you guys have donated to Ext, otherwise Jack will start to think Domino developers are cheapos! :lol:

jakehowl
26 Feb 2007, 3:25 AM
Any example to charge notes view via ?Readviewentries method with Ext 1.0?

http://www.codestore.net/apps/yelp.nsf uses Ext 1.0 Alpha 2 and a ?ReadViewEnties JSON call to build the grid.

Jake

galdaka
26 Feb 2007, 3:43 AM
Hi,

Thanks for yours replies. I would like to find an example of How to loading grid with Readviewentries in XML format.

In this post ( http://www.jackslocum.com/forum/viewtopic.php?t=3018 ) I am trying it to load with an agent who paints the XML but not works!!!. Any ideas?

With YUI-EXT 0.33-0.40 I use DominoXMLDataModel and works fine (With 50000 documents it ordering and paging very fast). With XMLReader I believe that it would be possible to parse Readviewentries without having to overwrite or to create new classes. Do you think that is possible?

RWaters
26 Feb 2007, 7:57 AM
Thanks for yours replies. I would like to find an example of How to loading grid with Readviewentries in XML format.

I'm actually working on the XML version first because I didn't want to limit Domino YUI to just people with 7.0.2 servers. I have views and paging working correctly with 1.0, but I need to finish up column sorting and the readdesign call. If things go well I may have a release this week as well. I'll post it on my blog and to the Domino YUI project on OpenNTF.[/quote]

galdaka
26 Feb 2007, 12:19 PM
Thanks for yours replies. I would like to find an example of How to loading grid with Readviewentries in XML format.

I'm actually working on the XML version first because I didn't want to limit Domino YUI to just people with 7.0.2 servers. I have views and paging working correctly with 1.0, but I need to finish up column sorting and the readdesign call. If things go well I may have a release this week as well. I'll post it on my blog and to the Domino YUI project on OpenNTF.[/quote]

Thanks RWaters,

In the last version (0.33 - 0.40) with DominoXMLDataModel all works fine. I hope that with this version one obtains to the same rapidity in the pagination and ordering. ;)

I working with 5.0.18 in client and domino 6 in server. All everything works fine.

JohnF
27 Feb 2007, 6:05 AM
Hi all Domino developers ... and Jack Slocum!

JackS, I've been following this API since august 2006 and the speed of its evolving is amazingly!

You can count me in on the upcomming section for Domino developers. I'm in the process of migrating the 0.33.x API that I have already implemented in a couple of projects to 1.0 alpha.

Jake, Jack R., Rich, and others... I'd love to contribute to the documentation and creation of examples for the upcomming Domino section.

The projects that I'm currently working on all has its administration interface using Ext.

For a long time I have been thinking about creating a blog of my own (yes it will be Domino based, but not on any of the normal templates out there :wink: )... so maybe this will be the time for me to get going. Hope to see you there as well.... I'll keep you posted.

mmcmahon
27 Feb 2007, 6:55 AM
I'm tinkering with the grid to get the paging to work more like an 'infinite scroll' along with the domino StartKey parameter. I don't like the MS Access style paging controls, so getting the grid to work the way I like is the first thing on my list.

jack.slocum
27 Feb 2007, 8:42 AM
Sounds great John.

There seems to be a lot of Domino developers using Ext so having a dedicated section makes sense. I will let everyone know when it is ready.

mmcmahon
27 Feb 2007, 9:04 AM
Sounds great John.

There seems to be a lot of Domino developers using Ext so having a dedicated section makes sense. I will let everyone know when it is ready.

Ext. is the NOS (car reference) for the Domino apps! With no native grid control beyond a rudimentary view, your UI controls are a great fit for a Domino application. Jake is one of our star players among others and I know that you'll likely see more Domino types paying a visit.

galdaka
2 Mar 2007, 1:18 AM
I'm actually working on the XML version first because I didn't want to limit Domino YUI to just people with 7.0.2 servers. I have views and paging working correctly with 1.0, but I need to finish up column sorting and the readdesign call. If things go well I may have a release this week as well. I'll post it on my blog and to the Domino YUI project on OpenNTF.

I canīt wait, How goes the development? I think that XML version in Domino is most global, because with this clases my application works in Domino 5, 6 and 7. When arrives the firts version?

Thanks RWaters,

galdaka
5 Mar 2007, 10:48 AM
Any example about Ext 1.0 Grid and Domino View?

KimH
5 Mar 2007, 11:30 AM
Any example about Ext 1.0 Grid and Domino View?
As far as I understand several examples will be release just before the 1.0 final release or just after... from several sources. Some of them are already mentioned in this thread, others you might find google'ing around.

galdaka
11 Mar 2007, 11:36 AM
Any advance about Ext 1.0 Grid and Domino View?

JohnF
11 Mar 2007, 1:21 PM
Any advance about Ext 1.0 Grid and Domino View?

I believe that everyone of us that do Domino development and work with the Ext API is currenly working on implementing one or more examples of how to integrate the two.

There are several situations that an "Domino extension" to Ext should or can have, such as:
- Support for JSON in R5, R6, R7, R8 (native or non-native)
- Support for XML in R5, R6, R7, R8 (native or non-native)
- Name lookups (JSON, XML, custom view/agent)
- Paging vs. non-paging vs. scrollable-lists
- Easy and simple integration into existing applications
- and more...

If you can help with something please add in... otherwise I would suggest keeping an eye on the blogs/sites that is currently working on extending Ext with Domino support.

jratcliff
13 Mar 2007, 9:48 AM
My OpenNTF project, DWT 0.3.0 is now integrated with Ext 1.0.

The code:

http://www.openntf.org/Projects/pmt.nsf/ProjectLookup/Domino%20Web%20Tools

Online demo:

http://jackratcliff.com/jratcliff/dwt/dwt-demo.nsf/main.html

galdaka
13 Mar 2007, 10:20 AM
An amazing work. It enchants everything to me what you have done. Personally I think about working in re-usable extensions of Ext 1.0. Your work is incredible, but it does not seem to me re-usable.

Iīd like to continue creating grid so and as Jack Slocum does it, because sometimes the IU that you propose is not the one that uses everybody.

For example, How I create grid in a DIV? You are forcing to see grid in contentpanel.

My English is bad I hope to me to have explained well.

KimH
14 Mar 2007, 12:58 PM
Looks good!

What is the status with:
- Save-and-replication-conflicts
- Response-documents
- Totals
- Categorization

jratcliff
15 Mar 2007, 8:42 AM
@KimH

I'm working now on:

- Response-Documents
- Totals
- Categorization

I forgot about save-and-replication-conflicts but I think that shouldn't be too difficult.

galdaka
15 Mar 2007, 11:07 AM
@jratcliff

Can you postme your mail to send you any suggestions and images? thanks.

My mail is [email protected]

I am trying to make your code a little but independent to use outline and view of separated way.

It needed to introduce grid in gridpanel and I I have obtained it.

I use original Ext 1.0 code combine with your code like this:

For views:

In a gridpanel:


view = new DominoUIView({
viewUrl : 'vista01',
pageSize : 15,
layout : layout,
target : 'center',
gridPanel : true,
toolbar : tb,
htmlTarget : 'centro-grid'
});

In a DIV:


view = new DominoUIView({
viewUrl : 'vista01',
pageSize : 15,
htmlTarget : 'example-grid',
gridPanel : false
});

For outline:


outline = new DominoUIOutline({
layout : layout,
outlinePanel : layoutWest,
outlineUrl : 'menuIzdo',
root: rootNodeTreeIzqdo //Its no necessary
});

You do not think that it is a better way to do it?

Sorry for my English.

jratcliff
16 Mar 2007, 6:58 AM
@galdaka

Yes, I'm thinking of exactly the same thing. Currently, my implementation forces you to create your outline/tree and view/grid within my DominoUI panels. My plan over the next few days is to make it so that you can create a DominoUIView or a DominoUIOutline and place it ANYWHERE (like you suggest).

galdaka
20 Mar 2007, 12:38 PM
Other questions for Domino Developers:

1) Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); not save the width / height of panels. expanded / collapse state yes.

2) If I put notes fields inside contentpanel, all looks great but when submit form (Notes form), the data not saved.


....
var layout = new Ext.BorderLayout(document.body, {
north: {
initialSize: 25
},
center: {
autoScroll: true
}
});
...
.....
layout.beginUpdate();
layout.add('north', new Ext.ContentPanel('norte', {fitToFrame:true, toolbar: tb}));
layout.add('center', new Ext.ContentPanel('centro', {fitToFrame:true}));
layout.endUpdate();
....
.....
<DIV id=container>
<DIV id=norte>
<DIV id=norte-tb></DIV>
</DIV>
<DIV id=centro>

Notes field here <=========

</DIV>

Any ideas???

@jratcliff

That sounds great. for when the independent version? and categorized view support?

KimH
21 Mar 2007, 3:13 AM
Ad. 2)
Have you checked that your fields are actually inside the <form...>...</form> segment after load? You can check this with the Firebug plugin in Firefox. If you don't know how to deal with this then try disabling Ext and see what the HTML output looks like compared to what it looks like after Ext (enabled again) has manipulated the DOM.

jack.slocum
21 Mar 2007, 4:32 AM
#1 is fixed in the trunk and will be in the next rev.

KimH
15 Apr 2007, 11:43 AM
2) If I put notes fields inside contentpanel, all looks great but when submit form (Notes form), the data not saved.

I assume that you have fixed this yourself? Or is this issue still open?

galdaka
15 Apr 2007, 12:13 PM
The problem continues.

The first idea: create 2 regions for a form: north (menu) and center (fields, etc.).

Why?: When scroll verticaly form the menu is visible.

Problem: When submit the data not saved.

Actually: No Layout. Toolbar in a DIV.

Problem: When scroll verticaly form the menu is not visible but the data is saved.

take a look: http://extjs.com/forum/attachment.php?attachmentid=94&d=1176397306

If any solved this problem, please report in this thread. Thanks in advance.

KimH
15 Apr 2007, 1:04 PM
Could you provide us with a link to the page in question or PM a link if you don't wan't it to be public?

galdaka
15 Apr 2007, 1:57 PM
Sorry KimH, I dont have a host. But you could reproduce the problem putting EXT simple dialog example in a Notes Form.

If you put notes fields into anywhere region, all render OK but when you submit form, the data not saved.

KimH
15 Apr 2007, 2:17 PM
Could you attach the HTML-output please?

timtripcony
15 Apr 2007, 2:49 PM
Check Firebug to see if there are multiple form elements in the DOM. Offhand, I'd guess that using the Ext form entry is adding a form element of its own in addition to Domino's default. If that's the case, then not all of your fields will be posting to the same place.

galdaka
16 Apr 2007, 1:02 PM
@timtripcony: I not use Ext.form. With simple layout, painting fields by "normal" way in notes web form, the data not saved when submit (IE6 & IE7 & FF).

KimH
17 Apr 2007, 2:13 AM
Please PM the HTML output and preferable the DXL export of your form and I can take a look... or post it here for others to help.

galdaka
17 Apr 2007, 11:23 AM
@KimH: I don

galdaka
17 Apr 2007, 11:33 AM
I try too removing form names "*****" and saves de form with: Ext.getDom('_Factura2').submit();

The field outside of Layout saves correctly but the field names "field" or you want (into a Layout) not saves data, appears blank.

KimH
18 Apr 2007, 12:50 AM
[QUOTE=galdaka;24023]@KimH: I don

galdaka
18 Apr 2007, 2:37 AM
I try too removing form names "*****" and saves de form with: Ext.getDom('_Factura2').submit();

The field outside of Layout saves correctly but the field names "field" or you want (into a Layout) not saves data, appears blank.

Try to quit "*****" form. The error continues.

KimH
18 Apr 2007, 3:00 AM
It still doesn't help if we can't see the HTML that is generated to your browser!

But anyway.... try to do the following:

Insert a '</form>' just before your pp1 form tag.
Change your pp1 form tag to something like: <form id="pp1" method="post" action="/prototypeNSF.nsf/0/4bc9404bec5399abc12572c1003679f4?SaveDocument">
Change your save JS to: Ext.getDom('pp1').submit();


Then if it still doesn't work, pleeeeeeeaaaasseeee post the resulting HTML. Otherwise I'm not able to help you further. (:|

galdaka
18 Apr 2007, 9:30 AM
I delete all form

KimH
18 Apr 2007, 11:15 PM
I try tomorrow put a internal form like you says:


<form id="pp1" method="post" action="/prototypeNSF.nsf/0/4bc9404bec5399abc12572c1003679f4?SaveDocument">

and I tell you the results.
Okay... let's take it from there :)


PD: Have you a similar problem as domino developer? Which is your solution?
Actually I have been doing this differently for the last 5-6 years, and that is to have 2 forms. The first one is content type text/html (*) but with XHTML 1.0 Strict doctype and encoded as UTF-8, so I have no code that is auto-generated from Notes :D If you do it this way then remember to do a ?ReadForm instead of ?OpenForm (**). Secondly, whenever I have a HTML form on such a page I post to another form which is a regular Notes form with all the Notes fields. On this second form I have a $$Return field that redirects me either back to the XHTML-based document, or back to a view (or whatever is desired).

(*) Remember that if you need to put a file upload control on such a page and have it in a template you'll have to figure out how to change the UNID of the file upload control in your source.
(**) I'm not sure but this approach might have been fixed in Domino R8 - I haven't tried to leave the ?ReadForm out, but I have been told from one of the developers from Lotus that it should be possible to create login-forms which is created your own way (text/html etc.) which is currently not supported, and thus you can't have XHTML 1.0 strict content on a standard Domino login-form.

KimH
23 Apr 2007, 12:01 PM
Galdaka, did you try it out yet? Is this solved or...?

galdaka
23 Apr 2007, 12:50 PM
Thanks in advance Kim and sorry for my bad english.

I work with in client 5.0.18 vs. Domino server 6.5.3 => Requirements of the client for which works.

One advantage: My developments are been worth for any version of Domino. ;)

I decide not implement my Notes Form

KimH
26 Apr 2007, 11:28 PM
Thanks in advance Kim and sorry for my bad english.
You're welcome :)


I work with in client 5.0.18 vs. Domino server 6.5.3 => Requirements of the client for which works.

One advantage: My developments are been worth for any version of Domino. ;)
I totally agree... but I'm most doing development on R6.0.3+/6.5.3+, then deploy on R6, R7 and R8 to see that it works on all versions. After that I implement some tests so that if you run newer (R7 / R8) versions then use newer Java etc. to having the applications performing better and/or better documentation in the code.

leezhou
28 Apr 2007, 2:50 AM
Yesterday, i wrote those code to read Domino View (use ?readviewentries).

Code is simple, and only support no category view. I think if want to support Category view, Ext must have a Component like TreeTable(Swing, SWT.....)

step is :
1、get domino view xml;
2、domino view xml to json;
3、json to Record

Comment is Chinese not English.

Attachment's encode is UTF-8.

galdaka
28 Apr 2007, 4:24 AM
Yesterday, i wrote those code to read Domino View (use ?readviewentries).

Code is simple, and only support no category view. I think if want to support Category view, Ext must have a Component like TreeTable(Swing, SWT.....)

step is :
1、get domino view xml;
2、domino view xml to json;
3、json to Record

Comment is Chinese not English.

Attachment's encode is UTF-8.


http://www.jackratcliff.com/

Posible problems:

http://extjs.com/forum/showthread.php?t=2924&page=2&highlight=authors+readers

leezhou
28 Apr 2007, 9:03 PM
http://www.jackratcliff.com/

Posible problems:

http://extjs.com/forum/showthread.php?t=2924&page=2&highlight=authors+readers


nnnnn,That's a problem!!

I use ReadViewEntries indeed of Agent run, because I think ReadViewEntries is more efficiency than runagent.

By the way, last week, I have wrote a framework in domino(use LotusScript),like :
1、HttpAgent;
2、HttpCookie;
3、HttpResponse;
4、HttpRequest;
...........
So I can do some thing like servlet:include, forward .....

Sample code like :
class MyWebAgent as WebAgent
public sub doGet (request as HttpReqeust, response as HttpResponse)
dim writer as WebPrinter
response.setContentType ("text/xml;charset=utf-8")
set writer = response.getWriter()
call writer.outtext ("....")
end sub

public sub doPost (request as HttpReqeust, response as HttpResponse)
....
end sub
end class

or

class MyWebAgent as SimpleWebAgent
public sub doService (request as HttpRequest, response as HttpResponse)
end sub
end class

And ......My english is so bad too:"> :">

leezhou
29 Apr 2007, 9:41 AM
http://www.jackratcliff.com/

Posible problems:

http://extjs.com/forum/showthread.php?t=2924&page=2&highlight=authors+readers

Solution 1:

1、request a agent to get viewentries total

2、request readviewentries,and ignore toplevelentries attribute

Solution 2:
1、create a category,add sum column
2、add on column in the view which formular is 1
3、readviewentries,use the first row like toplevelentries attribute

galdaka
1 May 2007, 10:49 AM
be patient:

http://www.takingnotespodcast.com/blogs/takingnotes.nsf/dx/TakingNotesEpisode59.htm

Your solutions slow down the URL native ?Readviewentries idea.

RWaters
1 May 2007, 12:15 PM
Yes patience will pay off here ;)

There will be a lot more information about Ext.nd soon