This is the mistake ! Thank you !!!
There is only a startParam, which is, in fact, not the same at all...

As a lot of people helped me on this forum, here is my small contribution, with a minimal working example to demonstrate how to use IBM LOTUS DOMINO VIEWS to fill EXTJS 4.1 GRIDS.

You can find some info on the forums, but nothing really 'packaged', and often with deprecated methods of Ext3 (and previous versions...)

I hope it will save a lot of time to people like me that got a headacke with those field mapping rules and this ***** start param (I finally found the answer in a very old post of Jack Slocum. Thank you Jack) :

Passing the start parameter into the load call is a bit fragile. Personally I would subclass the proxy and make the necessary overrides in there to tweak the request parameters based on the operation. That way paging will work reliably no matter how the requests are initiated.

In a previous try, I've indirect my code as you suggest with a Ext.data.Operation object, but, when I've called the operation with the proxy.read(myOperation) method, the grid didn't update as it does when I'm using the store.load method.

I'm sure it's possible to do as you said, but I didn't find how to update my grid once the poxy.read is finished.

Any advice ?

Bob Wilson

21 Jun 2012, 9:23 PM

After a few catch & tries, I've seen that I don't need to call proxy.read(operation).
I can directly use the store.load(operation) and that's it.

ingo.hefti

28 Jun 2012, 1:35 AM

After a few catch & tries, I've seen that I don't need to call proxy.read(operation). I can directly use the store.load(operation) and that's it.
Does your previous sample reflect your latest findings? Thanks!

Bob Wilson

28 Jun 2012, 3:24 AM

No, I didn't update my example, but as you ask, here his my last work. It could be useful for some people.

I've built a reusable function to build a JsonStore from any notes view.
The column model is fairly (too) simple at the moment, but I don't have time to dig more for now.
I'm still praying everyday that Jack releases a great Ext.ND view using Ext 4.1 and fast JSON (instead of XML agent conversion), with search features, paging, sorting, grouping...

To retrieve data within grids, just use 'c1' for view column 1, 'c2' for column 2, and so on.
Use 'unid' to retrieve the document unique id.

Here is the function that builds my store.
Feel free to comment, and criticize also.

/**
* Build a json store from a domino view
*
* @param {String} targetView : The url of the target view
* @param {Integer} start : The start index to retrieve data
* @param {Integer} limit : The number of documents that should be returned
* @param {String} restricToCategory : The category to filter if required. Set it to null if not needed.
* @param {Integer} columns : The number of columns to extract from the view
*
* @return {Ext.data.JsonStore} A JSON store containing the view entries, directly usable in Ext grids
*
* TODO :
* Use DXL to build the column model automatically...
* Columns model is currently static, with :
* - a column 'unid'
* - N columns named 'c1' to 'cn', where n is the columns parameter
*/
function buildStore(targetView, start, limit, restrictToCategory, columns)
{

And here is a grid example using this function.
I've added useful examples like :
- creating an action column to manipulate the document (edit, delete, etc...)
- handle the doubleclick on row
- setting a special CSS class on a row according to a column value (this one asked me a lot of time to figure out) :">

viewConfig: {
// Example of how to use a column content to highlight a grid row
// In the example below, we colorize the row with the CSS class 'RED' if the value of column 1 = 'URGENT'
getRowClass: function(record, index) {
var c = record.get('c1');
if (c == 'URGENT') return 'RED';
},

@Bob: your sample helped me a lot to get a working sample of accessing our domino server. As I like the MVC approach very much, I baked the code into an MVC app. Also I wanted to use paging (as domino does this very well with ReadViewEntries). Whilst implementing the ext paging toolbar I noticed two things:
clicking the FIRST PAGE button of the toolbar uses (again) a ZERO based START option... (already did a feature request to optimize that). So I had to override the loadPage() method of the store to correct this.
the paging toolbar uses the pageSize of the store for paging. So setting this in my store once will use it for the store load AND the paging.
Thanks again for your efforts!

Doing this in the proxy removes the need to sprinkle changes around elsewhere. The store and operation should use zero-based start, it's a detail of the proxy to switch it to one-based when contacting the server.

Doing this in the proxy removes the need to sprinkle changes around elsewhere. The store and operation should use zero-based start, it's a detail of the proxy to switch it to one-based when contacting the server.

To use it you'd then do something like:

var store = Ext.create('Ext.data.Store', {
proxy: {
type: 'domino',
reader: ...
}
});
This one is even better - works like a charm!
It took me some time to understand, what you are doing...
Very elegant! Thank you skirtle.

ingo.hefti

1 Jul 2012, 8:01 AM

I didn't have time yet to investigate the paging system, but I'm sure I'll need it in a very close future, so, if you could post a working example of it, I'd be happy to have a look at it.
I'll prepare a working sample database.

wki01

17 Jul 2012, 2:20 AM

Does anyone have a working example with paging bar?
Thanks in advance.

Bob Wilson

31 Jul 2012, 1:37 PM

Hi ingo.hefti,

After my previous "trip" to re-invent the "Notes2ExtView" with Ext4 & JSON, I am at the point where I would need a paging system.

I have 2 solutions :
- do it myself :((
- asking for help :">

Would it be ok for you to post your working example ?

ingo.hefti

1 Aug 2012, 3:04 AM

Would it be ok for you to post your working example ?

Hi Bob
No problem - and apologies for the delay (but you know, just came back from summer holidays... :D).
Here is a link to a working Domino DB: https://dl.dropbox.com/u/8085058/SenchaForum/DIRECTORY.NSF

(https://dl.dropbox.com/u/8085058/SenchaForum/DIRECTORY.NSF)The main page to call is ".. /directory.nsf/notesviewpaging". The app itself is done the MVC way. All js files are within the "Resources\Files\a1.." section. You will need to adjust the CompanyList controller with a valid address for the database on your server.

This uses EXT JS V4.1. All resources were copied directly to the html directory on the server. The remaining files are within the database. There is a problem with the resources not being found because of the url pointing somewhere else (chrome console). You can solve this with a web site config within the server config (works fine for me). But the sample still works also without the resources. This is just cosmetics.

I also started playing with filtering the view and it's already working, somehow... But work in progress - not finished yet.

Hope this helps!
Ingo

Bob Wilson

1 Aug 2012, 10:23 AM

But... Could you also send your private key so I can decrypt the database :D

I think you've done a local copy without unchecking the 'encrypt' option...(:|

ingo.hefti

1 Aug 2012, 1:20 PM

I think you've done a local copy without unchecking the 'encrypt' option...(:|
How embarrassing - the beginners number one mistake - and that to me... :">

Has been fixed now - my apologies!

Bob Wilson

2 Aug 2012, 5:18 AM

Don't apologize for giving something nice ! :-)

I didn't have the time to inspect the code, yet.

I'm worrying a little bit about the next step which will be the categorized views.
They are a great added-value in reporting views (for example, sales by year & month, etc...), but I don't have any idea yet of how to handle this with grids, and it's even worst if we think about the combination of categorization + paging. Ouch.
I maybe should have a look at the Ext.nd code to see how Jake could handle this.
Short nights are coming... :((

ashish.1983.agrawal

18 May 2014, 4:32 AM

I have two grids getting data from php mysql backend First grid is display of all classes in a school. This represents 1 table of mysql. And I have no issues in displaying data second grid gets data of students in a particular class, when one clicks on any of the class of first grid. Please see image below
http://i.stack.imgur.com/ptd1m.png
This is a different table in mysql. And I am "ClassID" to php file. which sends sorted JSON of students of that particular class
i use the below code
var studentView = this.getstudentGrid; var ClassData = record.get('ClassID');