Hi Mike, On Mon, Apr 12, 2010 at 20:53, Mike Davis <sk00te...@hotmail.com> wrote:
> > > > > > Similar question has appeared in this list earlier with no good answer. > > Though I suspect, this approach seems necessary is due to weak design. > > Can you describe use case why it seems necessary in place of database > > list, > > where you can set hql query for filtering necessary elements? > > > > Valdis > > Essentially I'm creating a sort of template for a space that I will want to > duplicate later. I have scripts that create objects from a spreadsheet > specifically for a certain class in this space. > > Rather than duplicating the class by hand on the next space I want these > scripts/objects on, I'd like to be able to quickly and safely duplicate the > class, so I wanted to write a quick groovy script to do it. > > If there is an easier way of doing this, I'd appreciate any ideas. > Have you tried copying the document holding the class? Guillaume > > -Mike > > > > I want to create properties for a new class on a blank document with > groovy. I can do the following: > > > > > > def doc = xwiki.getDocument("space.docname") > > > c = doc.getxWikiClass(); > > > > > > and look at elements of a class that already exists by doing: > > > > > > prop = c.get('propertyname') > > > > > > propToEdit = prop.getPropertyClass > > > > > > propToEdit.setValues('a|b|c') > > > > > > > > > > > > But, how can I add a new property to a class that has no existing > properties/fields? > > > > > > > > > > > > Thanks, > > > > > > -Mike > > > _________________________________________________________________ > The New Busy is not the too busy. Combine all your e-mail accounts with > Hotmail. > > http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4 > _______________________________________________ > users mailing list > users@xwiki.org > http://lists.xwiki.org/mailman/listinfo/users > -- Guillaume Lerouge Product Manager - XWiki SAS Skype: wikibc Twitter: glerouge http://guillaumelerouge.com/ _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users