
OpenNTF Code Bin
About This Code
Brief Description:
agent to render notes view for the web
Contributor:
Mike VandeVelde
Last Modified:
23 Feb 2006
OpenNTF Disclaimer
All of the program code and information presented in the OpenNTF.org Code Bin are provided "as-is", and should be used at your own risk. OpenNTF.org make no express or implied warranty about anything in the Code Bin, and OpenNTF.org will not be responsible or liable for any damage caused by the use or misuse of anything from this site. OpenNTF.org makes no guarantees about anything. Please thoroughly test all of the knowledge and code you find here before you attempt to use them in your production environment.
Code / Description
I built this agent to spit out existing notes views to the web looking as much as possible as they do in the notes client. Simply copy the agent into any database that is available on the web (, sign it,) and try it with one of your views. The attached database includes this 1 agent. Works on categorized or hierarchical views. I'd love to hear some feedback on it.
limitations:
-does not do calendar views
-does not do total columns
-does the entire view, will probably run into limitations on large views (may add &Start and &Count parameters later)
things I could use help fixing:
-in Mozilla after doing a quicklookup the Search button retains focus and keyboard controls don't work until you click focus back into the view
-in Opera it's the opposite - in a quicklookup the search field doesn't get focus until you click into it
-in Opera default keyboard actions still happen - arrows scroll the screen etc
Usage / Example
http://<server>/<database>/RenderView?OpenAgent
optional parameters:
&ViewName=<ViewName> *renders the default view by default
&RestrictToCategory=<Category> *doesn't work with multiple categories - only returns the 1st subcategory
&CollapseView *opens expanded by default
keyboard controls:
up/down arrows - once you've clicked on a row you can use the arrow keys to move around
enter - opens document/expands or collapses category
+/- keys - drops down responses/expands or collapses category
shifted +/- keys - expands or collapses all
any other displayable key - pops up quicklookup dialog
Code Attachments
Comments
Posted by zh leo on 02/26/2006 09:29:14 PMCan add the asceding and the descending sequence support
Can add the asceding and the descending sequence support?
Posted by Rickard M Andersson on 04/27/2007 10:13:46 AMExcellent stuff can you point me in the right direction for fixing the issue with subcats
regarding this issue:
&RestrictToCategory=<Category> *doesn't work with multiple categories - only returns the 1st subcategory
Posted by Mike VandeVelde on 05/10/2007 06:53:10 PMRestrictToCategory
Unfortunately it would be very hard to fix this. Search for "GetAllEntriesByKey and category" in the forum and you will see what I mean. The only solution is to do multiple lookups, and that only works if you know what the subcategories would be. It's basically a limitation of Notes itself, the same thing you would get in the Notes client.
Something that would be easier would be to improve it to handle multiple keys for multiple sorted (not categorized) columns. Only problem would be to decide on a separator character. I just haven't come across the need for this yet.
As for sorting (sorry haven't checked back on this in a while) - if NotesViewColumn had a IsSortable or IsClickToSort or ClickToSortType (ascending, descending, both) or something like that I might have given it a try. Making every single column automatically sortable would be a little severe I think. Not something I've really needed so far. If anyone slugs it out, I'd be interested to see it.