Inline Table for LiveData
| Contrib extension which depends on xwiki-platform |
| Type | JAR |
| Category | Macro |
| Developed by | Dorian Ouakli |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
Make a simple XWiki Syntax table filterable and sortable with the Live Data macro.
Summary
The Inline Table for Live Data extension allows to transform static XWiki syntax tables into interactive Live Data tables.
When viewing a page, users see a Live Data table with filtering and sorting capabilities.
When editing using a WYSIWYG editor, users can modify the original table syntax.
Features
Live Data
Inline Table for Live Data benefits from the user-side features of Live Data. See Live Data Macro User Features
This allows for:
- Table and Cards layouts
- Per column sorting and filtering
- Advanced filtering and sorting through the Filter and Sort panels
- Reordering and removing columns temporarily when viewing
Header Detection
Table Headings are automatically detected and are ignored for filtering and sorting.
When no headings are detected, the column number is used as the column name instead.
Date support
Inline Table for Live Data detects presence of dates.
By default, only the date format configured for the wiki is used for detection.
If no date format is configured, then yyyy/MM/dd HH:mm is used by default.
In order for the detection to be successful, the date format has to be the same for an entire column.
One can define the date formats Inline Table for Live Data should check for using the dateFormats parameter, using || as a separator between date formats.
For instance, one could have the following dateFormats parameter: yyyy/MM/dd HH:mm||yyyy/MM/dd||yyyy/MM||dd-MM-yyyy
Rendered Content Support and Table Detection
Tables present in the macro content are automatically detected and converted into interactive tables.
Multiple tables can be present in the content, they can also be surrounded by unrelated content.
When no table are present in the macro content, the content is rendered as is.
The extension also handles tables generated at render-time.
Some examples:
- Velocity macros within or outside table cells
- Queries that populate table data
- User permission-dependent content
- Time-sensitive information
Parameters
| Property Name | Default Value | Description |
|---|---|---|
id | N/A | Passed directly to Live Data, unique identifier used for URL encoded parameters. |
dateFormats | yyyy/MM/dd HH:mm | List of date formats separated with dateFormatsSeparator. See SimpleDateFormat for a specification. |
dateFormatsSeparator | \|\| | The regex used to find the separators for dateFormats. The \|\| default regex locates occurrences of ||. |
Examples
With a heading
{{livedata-inline-table}}
|= Country|= Capital city
|United Arab Emirates|Abu Dhabi
|Thailand|Bangkok
|Canada|Ottawa
{{/livedata-inline-table}}

Without a heading
{{livedata-inline-table}}
|United Arab Emirates|Abu Dhabi
|Thailand|Bangkok
|Canada|Ottawa
{{/livedata-inline-table}}
With a date column
{{livedata-inline-table dateFormats="yyyy/MM/dd HH:mm||yyyy/MM/dd||yyyy/MM||dd-MM-yyyy"}}
|= Employee |= Age |= Hire Date
|Alice Brown|32|2022/05
|Charlie Davis|29|2021/06
|Eve Wilson|27|2023/01
{{/livedata-inline-table}}



With a render-time generated table
{{livedata-inline-table}}
{{velocity}}
|= x|= x²|= x³
#foreach($i in [18..22])
#set($is = $i*$i)
#set($ic = $is*$i)
|$i|$is|$ic
#end
{{/velocity}}
{{/livedata-inline-table}}
Prerequisites & Installation Instructions
We recommend using the Extension Manager to install this extension (Make sure that the text "Installable with the Extension Manager" is displayed at the top right location on this page to know if this extension can be installed with the Extension Manager).
You can also use the manual method which involves dropping the JAR file and all its dependencies into the WEB-INF/lib folder and restarting XWiki.
Versions
Dependencies
Dependencies for this extension (org.xwiki.contrib:livedata-inline-table-macro 1.0.5):
- org.xwiki.commons:xwiki-commons-component-api 15.10
- org.xwiki.commons:xwiki-commons-script 15.10
- org.xwiki.platform:xwiki-platform-oldcore 15.10
- org.xwiki.platform:xwiki-platform-livedata-macro 15.10
- org.xwiki.contrib:livedata-inline-table-source 1.0.5