Today marks the release of my first video for Notes in 9. It has been my absolute pleasure to work with David Leedy on this project and I really hope that people find it useful. This blog entry is intended for my side-notes and also to provide a spot for any questions/comments.
Side Notes
This came about after my blog article on Adding a “working” visual indicator to the XPages TypeAhead. David approached me because he thought it would make a great Nin9 video. The original article was written from code on an 8.5.2 server and when I went to make the video on my 8.5.3 server I found that the HTML code generated for the type ahead was different any my code was “broken”.
As i said at the start of the original article, this is not bullet proof because you are always at the risk of this happening because we are manipulating the HTML created by the server. When IBM release 8.5.3 they upgraded dojo to 1.6 from 1.4 and the way the dijit comboxbox works had changed from one version of dojo to another, so IBM had to adapt.
The code in the example will work for 8.5.3 and 8.5.2 however because of the beauty of using the dojo.query. The 8.5.2 version is less complex and a couple of the lines in the addVisual() function are irrelevant. Because we are working with the dojo.query selector, and it find nothing to action on in the 8.5.2 HTML code, it does nothing – and most importantly fails over gracefully!!
Hope you enjoy the video 🙂
Marky
Good job on the video. You made it very easy to follow along and understand
thank Roy 🙂
Very cool functionality and I loved how you dove into Firebug to assist with the presentation. Still getting my feet wet with X-Pages but I always love seeing cool new enhancements or tweaks to the out of the box functionality.
I haven’t explored this yet but a possible enhancement might be to add an event monitoring the ajax call for the type ahead that checks it’s responseState and status in order to display a different graphic? For instance if the lookup failed, display some visual indicator such as a red x rather than simply have the graphic disappear. Just kind of brainstorming at this point. Keep up the great work. 🙂
James – good idea – I would love to !!! ……but unfortunately I looking into the TypeAhead.js dojo file which provides all the functionality and the ajax call is wrapped as a locally instantiated class within the dojo.declare setup – and that means we cannot programmatically insert ourselves into the process 😦
I did some research about adding a listener to the page for any ajax call, but I did not find a good solution I liked. It is definitely something which would complete the effect nicely.
I would not be understating things if I said it would not be hard for IBM to add this functionality to the TypeAhead.js
If they were looking for suggestions…..
🙂
James – I did it !
http://watchtower.notesin9.com/xomino/xPlay.nsf/xTypeAhead.xsp
Thanks to Sven Hasslbach who inadvertently posted what I needed on a Stack Overflow posting
http://stackoverflow.com/questions/9776503/xpages-get-the-contents-of-a-this-partialrefresh-ajax-call