On Tue, Mar 5, 2013 at 11:05 PM, Thomas Mortagne <[email protected]> wrote: > On Tue, Mar 5, 2013 at 9:35 PM, Vincent Massol <[email protected]> wrote: >> Hi devs, >> >> ATM in the model module there's no ability to reference an xobject other >> than by using a free form name. The problem is that this is not really >> usable. This is why we introduced the BaseObjectProperty in oldcore.
s/BaseObjectProperty/BaseObjectReference/ >> >> However this is major PITA since we can't have clean code that create an >> object reference and that doesn't depend on oldcore. >> >> I'd like to propose the following: >> * Modify ObjectProperty to add 2 named parameters: Class reference and >> position >> * Make the name optional in EntityReference >> >> This means that when we use an EntityReferenceResolver to resolve >> "wiki:space.page^wiki2:space2.page2" we get an ObjetReference with: >> * name = null >> * param1: name = "classReference", value = EntityReference >> * param2: name = "objectPosition", value = 0 >> >> Rationale: >> * This is exactly what we already do for Locale (and what we'll do for >> Version too probably) so it's logical to do it for Object References too >> >> Consequences: >> * We need to modify the Seralizers/Resolvers accordingly >> * We need to modify EntityReference to support a null name >> * We deprecate BaseObjectProperty > > s/BaseObjectProperty/BaseObjectReference/ > >> * Probably some other stuff to modify like modifying event listeners >> listening on objects since it's now going to be much easier, etc >> >> WDYT? > > +1 > > One note: > * ideally it should probably be possible to set a relative reference > for the "classReference" property (avoid having to resolve the full > class DocumentReference when 100% of the time it's for a class in the > same wiki than the object document right now) > >> >> Thanks >> -Vincent >> >> _______________________________________________ >> devs mailing list >> [email protected] >> http://lists.xwiki.org/mailman/listinfo/devs > > > > -- > Thomas Mortagne -- Thomas Mortagne _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs

