Benoît Benoît wrote: > Hi devs, > > > > It is possible to define two XWiki classes with a relationship of > inheritance? > > Example: I have MyDocumentClass and MyHeaderClass, it is possible to say all > properties of MyHeaderClass are properties of MyDocumentClass ? >
No, this is not possible yet. > Maybe I should prefer composition to inheritance ;-) > > So, can I define a new datatype (like Number, String, TextArea, …), and > create a propertie of type MyHeaderClass in the definition of > MyDocumentClass ? No, you can't do that easily. The existing properties are pretty simple properties, so unless MyHeaderClass can be seen as a single String value, then the answer is no. Another approach (somewhat referential composition) is to have a DBList property inside MyDocumentClass, that selects instances of MyHeaderClass. It is up to your scripts to expand this reference. -- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

