Been playing around with integrating the new release of Ext into Domino YUI. There are a few others working on it as well: Jack Ratcliff & Jake Howlett.
It seems that everyone has noticed the transfer hasn’t been completely straight-forward, so I figured I’d post my fixes to a couple of the issues that we’ve all seem to run into (dealing with the new Grid implementation)
EDIT: In Ext 1.0 Alpha 2 this hack is no longer needed
-
var proxy = new Ext.data.HttpProxy({
-
url: parentURL,
-
method: "GET"
-
});
-
proxy.conn.extraParams = { resortAscending: 1 };
-
proxy.conn.on(‘beforerequest’,function(e,opts) {
-
if (this.url.indexOf(‘&’) != -1) {
-
this.url = this.url.split(‘&’)[0];
-
}
-
this.url += "&"+Ext.urlEncode(Ext.apply(opts.params,
-
this.extraParams));
-
});
There’s an issue with the new Connection routine not sending parameters through if you change the method to get instead of post. I wrote an event listener that attaches to the connections beforerequest event which strips off any parameters already on the URL (anything after an &) then serializes and places the parameters back onto the URL. I went through a couple rounds of tweaks and ended up with very similar code to what Jack is using for Post requests. The example above also tests out sending additional parameters through by setting the connections extraParams property.
Another issue that kept coming up was the hard-coded paging parameters to start at 0 and use “limit” as the keyword where Domino needs “count”. To fix this issue I extended Ext.PagingToolbar and wrote Ext.DominoPagingToolbar.
-
Ext.DominoPagingToolbar = function(el, ds, config){
-
Ext.PagingToolbar.superclass.constructor.call(this, el,
-
null, config);
-
this.ds = ds;
-
this.cursor = 1;
-
this.render(this.el);
-
this.bind(ds);
-
};
-
Ext.extend(Ext.DominoPagingToolbar, Ext.PagingToolbar, {
-
onClick : function(which){
-
var ds = this.ds;
-
switch(which){
-
case "first":
-
ds.load({params:{start: 1, count: this.pageSize}});
-
break;
-
case "prev":
-
ds.load({params:{start: Math.max(1,
-
this.cursor-this.pageSize), count: this.pageSize}});
-
break;
-
case "next":
-
ds.load({params:{start: this.cursor+this.pageSize,
-
count: this.pageSize}});
-
break;
-
case "last":
-
var total = ds.getTotalCount();
-
var extra = total % this.pageSize;
-
var lastStart = total – (extra || total-this.pageSize);
-
ds.load({params:{start: lastStart, count: this.pageSize}});
-
break;
-
case "refresh":
-
ds.load({params:{start: this.cursor, count: this.pageSize}});
-
break;
-
}
-
},
-
getPageData : function(){
-
var total = this.ds.getTotalCount();
-
return {
-
total : total,
-
activePage : Math.ceil((this.cursor-1+this.pageSize)/this.pageSize),
-
pages : total < this.pageSize ? 1 : Math.ceil(total/this.pageSize)
-
};
-
}
-
});
While still hard coded its now geared to Domino. A couple of hacks were necessary to make activePage reference the proper values.
Anyway, hope its of help to any others who may be trying to implement Ext 1.0 on a Domino system. Stay tuned for a new Domino YUI release once I get things working smoothly.

Hi Rich,
You and Jake are ahead of me with implementing Ext 1.0 in Domino. I’m just now starting to look at it. I appreciate you sharing your workarounds and customizations to get Ext working with Domino. I’ve had the need to work with views with readers fields so the paging has been the biggest challenge. I have a pretty decent solution right now and I’ll blog about it soon so that you and others can pick it apart and hopefully we can make it better and more rock solid.
Jack Ratcliff
February 24th, 2007
Cool, I haven’t messed around with any of this in applications using readers fields. I look forward to your post.
Rich Waters
February 24th, 2007
Hi Rich,
Finally found some time this week to start converting my DWT project over to using Ext 1.0. As for using a GET request versus a POST, do you come across any issues where the GET doesn’t go to the server but instead pulls from cache? I found that Domino is ok with a POST to ReadEntries and ReadViewEntries. Just wondering your thoughts.
Jack
Jack Ratcliff
March 2nd, 2007
I haven’t run into any issues so far with ‘GET’ requests caching. I’ve been having some odd issues with javascript files caching but that’s pretty much it.
Rich Waters
March 2nd, 2007
Hi Rich,
I think it only happens in IE. Using HttpWatch(Fiddler will probably show the same results), I see that as a page thru and view and then page back, urls that I have already hit before are pulled from cache. I know that in some of our custom apps we always tack on a timestamp parameter to the end of a url to trick IE into not pulling from cache. I don’t know if I should do the same here or perhaps Ext has a setting/config option I can set that will do it for me. Do you know of one?
Jack
Jack Ratcliff
March 4th, 2007
Hi Everyone,
I just start to implement the rBefore release of Ext framework. Bu I also apreciate your sharing.
We use Domino Yui as a foreground into a dev for a multinational company.
I expect to thanks all of you when dev will be finished in the name of our company.
Ben
March 16th, 2007
Jack, you can work around the caching issue by appending a parameter to the URL with a random value. There are several threads on the extjs.com forum discussing this. Right now the forums seems down (probably due to a re-configuration of the indexes) so I can’t link to any of the threads now. Hope you can find it yourself.
John Foldager
April 13th, 2007