Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-06 Thread Abel Solórzano Astorga
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

Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-05 Thread Abel Solórzano Astorga
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

Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-05 Thread Caleb James DeLisle
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

Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-05 Thread Sergiu Dumitriu
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

Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-04 Thread Caleb James DeLisle
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 =

[xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-02 Thread Abel Solórzano Astorga
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

Re: [xwiki-users] Is there a way to dynamically change the values on a static list or on any other property of a xwiki class?

2010-03-02 Thread Caleb James DeLisle
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