Thanks a lot guys,
I followed the suggestion of Sergiu and it works just fine.
Abel
On Fri, Mar 5, 2010 at 6:51 PM, Sergiu Dumitriu ser...@xwiki.com wrote:
On 03/06/2010 01:06 AM, Abel Solórzano Astorga wrote:
Thanks again Caleb,
I try your suggestion, but I keep getting a null value
Thanks again Caleb,
I try your suggestion, but I keep getting a null value from *
valdoc.getDocument().**getxWikiClass().get(Project)*.
The fields Map (
*valdoc.getDocument().**getxWikiClass().fields.keySet(**)*) is empty.
I put the following line on the code:
*println
It looks like you have isolated the problem because doing the same thing with a
class that is known to exist
$xwiki.getDocument('XWiki.XWikiPreferences').getDocument().getxWikiClass().toString()
displays all of the properties in xml format. I also double checked by adding a
property to
On 03/06/2010 01:06 AM, Abel Solórzano Astorga wrote:
Thanks again Caleb,
I try your suggestion, but I keep getting a null value from *
valdoc.getDocument().**getxWikiClass().get(Project)*.
The fields Map (
*valdoc.getDocument().**getxWikiClass().fields.keySet(**)*) is empty.
I put the
Abel Solórzano Astorga wrote:
Thanks Caleb,
I follow your recommendation, but I am getting a BaseClass with no
properties.
The class I am creating it is supposed to have 4 properties.
I am using the folling code to use the class:
*...*
*docname =
Hi everybody,
Is there a way to dynamically (through groovy code) change the values on a
static list or on any other property of a xwiki class?
I am using *field = document.getxWikiClass().get(propertyName)* to get the
property.
document is of type* com.xpn.xwiki.api.Document*.
But when I try
I can tell you that it can be done, anything which can be done by
the user can be done with groovy.
document.getxWikiClass().get(propertyName) returns an object of
type element.
http://maven.xwiki.org/site/xwiki-core-parent/xwiki-core/apidocs/com/xpn/xwiki/api/Element.html
I think you need to