On Mon, Apr 20, 2015 at 11:31 AM, TOTOUM NEMKAM, Eva <[email protected]> wrote: > Hello, > > Please, i have two problems : > 1) i try to add an object using this code > ## Create an object > #set($obj = $doc.newObject("XWiki.SomeClass")) > $obj.set("field1","value1") > $obj.set("field2","value2") > ## Save the object in the page > $doc.save() > but when I click on "save and view", the values I have set for my fields > are not saved, > the fields of the object are empty; Moreover, when I add a second object, > there are only the first that is displayed on the page. >
> 2) I would like to create corresponding objects to my XCLASS ( For example i > have create xClass Environment, Brick ...), a Xclass Environment contains a > list of bricks ( i would like to add such property List<Brick> bricks to an > object of EnvironmentClass...). > > In fact, I would like to create my data model in order to use it in my pages. > > I want to know how to create a List property <Brick> for example or in > general List<Xclass>. For 2) see http://www.xwiki.org/xwiki/bin/view/FAQ/HowToCreateAOneToManyRelationshipInXWiki Hope this helps, Marius > > Thanks. > > This message contains information that may be privileged or confidential and > is the property of the Capgemini Group. It is intended only for the person to > whom it is addressed. If you are not the intended recipient, you are not > authorized to read, print, retain, copy, disseminate, distribute, or use this > message or any part thereof. If you receive this message in error, please > notify the sender immediately and delete all copies of this message. > _______________________________________________ > users mailing list > [email protected] > http://lists.xwiki.org/mailman/listinfo/users _______________________________________________ users mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/users
