The Accordion control is used to display a categorised view of data. A category can be exapnded by tapping it and the documents will be revealed. This is a great way of showing data in a more organised way.
This control is required to be wrapped in a [[unpScrollableArea]] control and you must include the unplugged.css as a resource on your XPage.
Usage
Drag the control onto your XPage and complete the following Custom Properties:
- ajaxload
- option to load pages via ajax for smoother transition or full page load - default (blank or Yes) is to load by ajax
- dataColumn
- v3.3 option to specify the column number to get data from (count from zero)
- summaryColumn
- v3.3 option to specify the column number to get summary from (count from zero).
- dbName
- optional parameter to specify which database the view you want to open is located in. The database path should be delimited with forward slashes (e.g. mydir/mydb.nsf). Leave blank for the same db
- viewName
- the name of the view to get data from
- expandfirstcategory
- boolean - the first category's contents can be displayed 'open'
- xpage
- the name of the XPage to open documents in the view with
- insetData
- gives a rounded look and feel with padding. Default is true.
- position
- whether the view will position itself to work in conjunction with the UnpViewsList control (Landscape mode on tablet). By default it will choose left-aligned as if you are not using the UnpViewsList control and will fill the width of the screen.
The 'Load More' function is defaulted to 12 rows before it is rendered. This is editable within the required UnpAccordionViewList.xsp XPage. This uses AJAX requests to retrieve chunks of data to be inserted into each category to display more info.
By default this control requires that the view have the first, and only the first, column categorized and up to 2 additional columns of flat data that will be displayed in the row data presented to the user. Column 2 in the view will be in blue text while column 3 will be in black underneath the data presented from column 2. However, as of version 3.3, if you specify dataColumn and summaryColumn then you can use multiple levels of categorization or access different columns of data.
Required Resources
On the assumption you are using UnpHeader in your application then no extra resources are required.
If you are not using UnpHeader, then make sure you add all of the resources included in UnpHeader to your UnpMain XPage.