Dojo Data Grid problems in XPages

February 4, 2011 § 3 Comments

I’m working on a project where I need to use an Dojo Data Grid (djxDataGrid) to enable Excel like editing. (As a note I can mention that I’m using the XPages Extension Library from OpenNTF to accomplish this.)

I want to present a selection of documents from a Domino View. The problem is that I get empty rows for those documents that should not be presented:

I use a RestService control to collect the data from the Domino View. This service is of the type viewItemFileService (I have also tested another of the types with the same result, the distinction between the different services is not clear to me).

I have tried using either the property categoryFilter or the key propert. Both with the same unsatisfactory result.

I have also tried to set a readers field to limit what is shown in the data grid. The result is still the same.

Another way to solve my problem is if I could bind a javascript object directly to the data grid (this is actually the preferred way as I originally don’t have the data as Notes Documents). I haven’t been able to find any documentation about how this could be accomplished.

I guess I will have to read the source for the custom controls in the extension library and try to figure out if it is doable.

Advertisements

Tagged: , , , ,

§ 3 Responses to Dojo Data Grid problems in XPages

  • Petter Kjeilen says:

    Hi !

    Did you ever find a solution to the problem with “empty” rows in the dojo grid ? I´m having the same problem here and would be very interested in how you resolved this 🙂

  • Kristoffer says:

    The solution was to manually bind the grid with a json object and send the json object to the client with a “remote service” procedure.

    This solves the document view problem and I can manually filter the json object that I send back to the client.

    1. add dojo grid to xpages.
    2. bind the ItemFileReadStore through javascript.
    3. load the json array from the server and update the client store.

    Note. this will make it more difficult to update data back to the server.

  • Chappers says:

    Hi,

    Its a hack I admit but if you up the number of rows per page to, say 100, then the empty rows no longer effect the data being posted back.

    Its a bit poor I know, but it does work.

    Steve

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

What’s this?

You are currently reading Dojo Data Grid problems in XPages at Strange Epiphany.

meta

%d bloggers like this: