logo

The YAHOO.ext.Domino.View Object

This weekend I had nothing much better to do, so spent some time hacking YUI-ext and working on YELP! (the proof-of-concept web-enablement of the !!HELP!! OpenNTF project).

My main achievement was to extend and abstract — if that's the right word — the YUI-ext code to include some Domino-specific functionality. You can now create a Domino-like "grid" within a YUI-ext layout with two lines of code:

view = new YAHOO.ext.Domino.View('view-grid-id');
view.open('Tickets');

You can see the results at codestore.net/apps/yelp.nsf/.

Open other views using the left hand navigation area.

The number of columns, their widths and titles are loaded from a ?ReadDesign URL in JSON format when you call the .open() method*. This method also calls a ?ReadViewEntries to load the JSON data for the view. At this point the YAHOO.ext.Domino.View object knows how many documents are in the view and can initialise the paging element below the view, which tells you how many pages there are.

Those interested in how it works can hack the site apart quite easily. Those who would prefer the download will have to wait while I decide how to make it available. Obtaining it might involve a charitable donation in the form of sponsorship for an upcoming sporting challenge I might be involved in...

* Adding a new column in the background will update the web front-end the next time the open method is called.

Comments

    • avatar
    • Free4All
    • Mon 19 Feb 2007 07:51 AM

    Similar to the work by Rich Waters also on the OpenNTF.otg system...

    {Link}

    Enjoy !

    • avatar
    • Steve Smilie
    • Mon 19 Feb 2007 08:10 AM

    Nice demo! I have been waiting for the day when good looking Web Views were that easy. Any reason you chose to use the Yahoo toolkit? It seems like IBM is pushing the Dojo toolkit and is also using it in upcoming products (like Quickr 8).

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 08:19 AM

    I chose YUI because of what Jack Slocum had added with the YUI-ext package. He'd done all the hard work already. I just had to hack it to make it play with Domino and its peculiarities.

    I don't know much about Dojo other than it's virtually undocumented. I'm sure you could create a grid like this using Dojo, but I've yet to see it and wouldn't like to be the one to try.

    The fact that IBM chose to adopt Dojo is fairly irrelevant to me really.

    • avatar
    • Stuart
    • Mon 19 Feb 2007 08:58 AM

    Nice work Jake - have you managed to crack Categorised views and response document only columns?

  1. Hi Jake ... thats looks great ... i noticed that the horizonatl splitter was not working properly and that when i opened a document it opened 3 times in IE v7.0 ... documents opened fine in firefox.

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 09:10 AM

    Stuart. Not even tackled date/list/sortable columns yet, never mind categorised views. One day. Maybe.

    Mike. Works "fine" for me in Ie7. Bear in mind that this is really just a work-in-progress play area and nothing should be expected to work perfectly. Or at all in some cases.

  2. Great Work Jake, may I suggest a search box on the navigation bar, next to refresh, just seems like a good thing to have by default.

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 09:30 AM

    Brian. I'd be inclined to put search somewhere else but it's a good idea and something I'll add to the to-do list. That is add a view.search() method.

    The idea is not just to make a version of !HELP! but to show how easy it could be to express typical client applications in this way. The more object and methods we can add the better. See my post tomorrow for more on that.

    • avatar
    • Val
    • Mon 19 Feb 2007 09:44 AM

    Jake, Is this for Domino 7 only ?

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 10:04 AM

    Val. Only because I've used and prefer OutputFormat=JSON. No reason it can't work on R6 if somebody is willing to make it work with XML. Which it looks like they've done on the OpenNF YUI project, so, in theory, you could copy a file over from that and it would be a bit easier.

  3. You gotta love that yui-ext grid!! I have found a hundred uses for that around the office.

    Very cool indeed.

  4. That's gorgeous, Jake. Let me know when and how I can sponsor you. :-)

  5. My 2 american copper pennies...

    1p - Have the ticket form close when submitted... I know that goes to actual implementation rather than yui extensibility.

    My other penny goes to suggesting the refresh icon animate while an ajax message is processing so we know we are waiting for something.

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 04:15 PM

    Jerry. Glad you like. Form closing on submit is in the list in my head. Obviously this should call a .refresh of the view as well, assuming the form has anything to do with the open view.

    Not sure what you mean by the other bit. Are you saying that any Ajax activity at all should make the view refresh icon animate?

    • avatar
    • noon
    • Mon 19 Feb 2007 04:53 PM

    "Nice demo" comments from here too :)

    Does this work in R6 aswell or just in R7?

    • avatar
    • Jake Howlett
    • Mon 19 Feb 2007 05:29 PM

    Thanks noon. Read earlier responses for answer.

  6. Jack Slocum just released Ext 1.0 Alpha today. I can't wait to see what new goodies are in store. The grid was totally redone, but for the better. the old grid used absolutely positioned spans instead of table cells and thus you couldn't have rows that grew in height and some other goodies. The new grid uses a table for the layout, thus allowing for rows to grow (this will be nice for data in domino views) and you can also have excel like freeze panes.

    If you want to see two more Domino+Ext projects then check out OpenNTF for Domino Web Tools (DWT) {Link} and Domino YUI {Link}

    Here's an online demo of the Domino+Ext stuff from DWT.

    {Link}

    I already have flat views working (even with reader names in docs), sorting and change view working and outlines, using Ext's tree control.

    • avatar
    • Jake Howlett
    • Tue 20 Feb 2007 01:56 AM

    Brilliant stuff Jack. It looks like you've done a lot of what I have planned for YELP already with DWT. Great minds, hey.

  7. :-)

    Jack Ratcliff, Niel Revelle, Rich Waters,Jake Howlett

    Great minds!

    tks

    ;-)

  8. Did you notice that if you click on Foo then click on Tickets... the column names turn to {1}?

    Everything else looks good.

    Cool stuff! Thanks for showing me how much of a Junior programmer I really am.

  9. I just noticed that the {1} thing is in IE only.

    • avatar
    • Brian Miller
    • Tue 20 Feb 2007 10:17 AM

    Even better, I'm waiting for the jQuery support in Ext to be completed. Jack says that it'll be in by the time he declares 1.0 gold.

    {Link}

  10. re: animate refresh... That's precisely it, Jake. A little bio-feedback to the user so they know the system is loading a view, document, etc. Otherwise, an impatient user (such as myself) would click on a view link... and see nothing happening and wonder if he had miss-clicked and click again (restarting the ajax call) and still see nothing immediate and eventually maybe get the idea to be patient. Just a little UI nicitie. If I see something happening when I click, I know to be patient for a moment. Might not seem like a terrible long time when you test it locally, but over the net, sometimes it might take a second or two of bewildering nothingness.

    Having the refresh icon animate seems intuitive as we would see it run if clicked on anyway to perform almost the same function - load something into the UI.

    Follows the "don't make me think" rule of thumb.

  11. Jake,

    The problem that Mike sees can be reproduced by switching between views and then opening a document. I had the same problem in my code as well. The way I fixed it was by calling the grid.destroy() method before opening a new view.

    Jack

  12. Hi Jake,

    Woaw once again!!!

    Um... Well, how much (swiss chocolate tablets?) to have the .nsf... Let me know!!!

    Greetings form Geneva!

    Alex

    • avatar
    • amahi
    • Thu 19 Jun 2008 08:39 AM

    I m working on the same features (Domino view) but with adobe flex technologie:

    {Link}

    Source available here

    {Link}

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Mon 19 Feb 2007

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

Elsewhere

Here are the external links posted on the same day.

More links are available in the archive »

More Content