DBListManager Application
Last modified by Eleni Cojocariu on 2026/11/06 13:23
| Helper to manage Database List values (used like a Static list) of a class |
| Type | XAR |
| Category | |
| Developed by | |
| Rating | |
| License | GNU Lesser General Public License 2.1 |
Table of contents
Description
This application is a helper for simple users that allows them to design the fields of a DataBase List, which is used as a Static List that users can easily edit, without needing editing rights on the class.
Usage
Just write:
{{dblist_manager property='..' wikiclass='..' showQuery='true|false' documentHandler='..' showTitle='true|false' /}}Where :
- "property" is the property of the class to manage (must be a Database List!).
- "wikiclass" is the class which contains the property.
- "showQuery" (optional) is for the class designer: display or not the query to put on the "Hibernate Query" field of the property. (default: false)
- "documentHandler" (optional) is the document where the Database list entries will be saved. Default: the current document where is used this macro.
- "showTitle" (optional) shows or not the title. (default: true)
Then, in your class, you can create a 'Database List' property and fill in the 'Hibernate Query' the content that you can display with showQuery parameter of the macro.
Example of use
- In your class, add a Database List field

- In the page where you want the user can customise it, call the macro:

(or)
- Get the Hibernate Query

- Put it on the "Hibernate Query" field of your property in your class:

- Add some values using the macro

- Enjoy the results, when you create an object of your class:

Maven
Developers, if you want to add this application as a dependency of your own XAR, just add the following lines in your pom.xml file:
<dependencies>
<dependency>
<groupId>org.xwiki.contrib</groupId>
<artifactId>xwiki-dblistmanager-application</artifactId>
<version>1.0</version>
<type>xar</type>
</dependency>
</dependencies>Prerequisites & Installation Instructions
Don't forget to add Macros.DBListManagerTranslations to your translation files.