Add a "Collapse All" button/link to your categorized view
Quick tip for today. The XPages View control allows to display categorized views. While I don't like them in web applications one still wants to use them. In the Notes client categorized views have a handy "expand all" / "collapse all" SmartIcon pair which is missing in XPages. The shortest way to get these is to add an output script to your page:
You need to adjust the names in bold red. Works like a charm. Left to the reader: figure out the command for Expand all (or create a toggle control).
As usual YMMV.
XSP.attachPartial("#{id:viewColumn1}__shrink:1", "#{id:collapseAllElement}", "#{id:viewPanel1}", "onclick", function(){}, 0, "#{id:viewPanel1}_OUTER_TABLE");
You need to adjust the names in bold red. Works like a charm. Left to the reader: figure out the command for Expand all (or create a toggle control).
As usual YMMV.
Posted by Stephan H Wissel on 20 April 2011 | Comments (5) | categories: XPages