From version < 2.1 >
edited by Oana Florea
on 2019/01/15
To version < 3.1 >
edited by Oana Florea
on 2019/01/15
< >
Change comment: Upload new image "HQLExample.png", version 1.1

Summary

Details

HQLExample.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.OanaTabaranu
Size
... ... @@ -1,0 +1,1 @@
1 +144.7 KB
Content

The list displays XWikiDocument properties

To display XWikiDocument properties values like "doc.title", "doc.author", "doc.fullName" (see full list on the Hibernate mapping document) from another application (represented for example by the class Domains.Code.DomainClass)you can use the following fields:

  • XWIKI CLASS NAME (the class for the application you want to pull the data from)
  • ID FIELD NAME (usually "doc.fullName" to uniquely identify the document(s) selected)
  • VALUE FIELD NAME (usually doc.title because it represents the pretty name displayed to the user)

Wizard Example

The list displays custom properties

When you need to display a certain property value from another application (represented for example by the class application.Code.applicationClass) inside the database list you should use the "Hibernate Query" field. For example, to fill in the list with the values of the property "shortText1" (property name automatically generated by the AWM wizard) for an AWM "application", the "Hibernate Query" field should use the following value (assuming "shortText1" is "Short Text" which means "StringProperty" for the Hibernate mapping):
select d.fullName, prop.id.value from XWikiDocument as d, BaseObject as o,
  StringProperty as prop where o.name = d.fullName and o.className = 'application.Code.applicationClass'
 and d.fullName <> 'application.Code.applicationTemplate' and o.id=prop.id.id and prop.id.name='shortText1'

Wizard Example

Get Connected