hi Marius,
thanks for your answer.
My problem seems to be different: I would like to show property values
of objects not contained in the current document.
At last, I tried this
{{groovy}}
hql = "select obj from BaseObject obj where
obj.className='MySpace.MyClass'"
results = xwiki.search(hql, 0, 0)
xclass = results[0].getxWikiClass(xcontext.context)
println "|=Title |= Value
results.each { item ->
println "|[[$item.name>>$item.name]] |${item.get('MyProperty')} |
}
{{/groovy}}
(I hope, I didn't copy it wrong)
This should print a table iterating over all objects of MyClass, with
the first column showing the object title, which works fine. The second
column should show some property value. But no combination of method
invocations of BaseCollection, BaseObject, PropertyInterface etc. worked.
Thanks
Matthias
Am 29.01.2014 08:25, schrieb Marius Dumitru Florea:
See
http://platform.xwiki.org/xwiki/bin/view/DevGuide/APIGuide#HAccessobjectsin…
. You should also check the sheet generated by AWM for your class
structure. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/App+Within+Minutes+App…
.
Hope this helps,
Marius
On Tue, Jan 28, 2014 at 6:39 PM, Matthias Albert <matthias.albert(a)gmx.de> wrote:
Hi all,
after I managed to create a class structure using AppWithinMinutes, I
could create objects of this class in the Application's start page.
Now I am trying to create a different xwiki page, that should show a
filtered table view of the objects created using velocity statements.
I could create a #foreach loop iterating over the objects and show each
object's name.
My problem is: how can I show some of the property values? The class
properties have names like:
Beschreibung (shortText1: String)
Can anyone give a hint?
Thank you in advance
Matthias
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users