On Fri, Oct 2, 2009 at 11:30 AM, Eric Domeshek <domes...@stottlerhenke.com>wrote: > > I'm starting to explore use of XWiki for a project where we want to > provide a domain-specific semi-structured wiki which seems like it ought > to be a good fit to XWiki's intended usage.
Yes, it is. Xwiki is the best thing to hit open source since Linux and Emacs :-) . Xwiki is Emacs for the Web. All it's missing is Clojure via JSR223 to get the Lisp extension language... > However, we're having a bit > of trouble getting started understanding what can and can't easily be > captured in the XWiki data model. Specifically: > > 1- What is the recommended way to specify object fields that contain > references to other XWiki objects? > This is being discussed over on the dev list right now: http://www.mail-archive.com/d...@xwiki.org/msg11295.html http://osdir.com/ml/web.wiki.xwiki.user/2008-02/msg00135.html [...] define the option lists is by using the fields: XWiki Class Name, Id Field Name, Value Field Name and Parent Field Name. Using those fields, the XWiki platform<http://osdir.com/ml/web.wiki.xwiki.user/2008-02/msg00135.html#> constructs the following hql queries: select idprop.value, valueprop.value, parentprop.value from XWikiDocument doc, BaseObject obj, StringProperty idprop, StringProperty valueprop, StringProperty parentprop.value where obj.name = doc.name and obj.className = "value entered in Class name" and idprop.id.id = obj.id and idprop.id.name = "value entered in Id Field Name" and valueprop.id.id = obj.id and valueprop.id.name = "value entered in Value Field Name" and parentprop.id.id = obj.id and parentprop.id.name = "value entered in Parent Field Name" So, it selects from objects of a given type (XWiki Class) 3 properties (of storage type String, read bellow what this means). As a special case, you can use "doc.<some doc property>" or "obj.<some object property>" instead of property names, and the query is adapted accordingly. In the case of DBList, only 2 columns are selected, as the Parent property is not used/defined. String storage type means: - either a property of type String - or a property of type StaticList, DBList or DBTreeList with multipleSelect = false If you want to use the DBTreeList, you must model your data so that they will allow these kind of queries. > 2- What is the recommended way to specify object fields that > contain references to non-XWiki plain old Java objects? > I'm going to let someone else answer what's recommended. This is one way: http://code.xwiki.org/xwiki/bin/view/Modules/PropertiesModule > 3- Is there a standard way to define fields as holding > ordered/unordered lists/sets of objects as opposed to single objects? > Check the "multiple select" option for List, DatabaseList or DatabaseTreeList? in the class editor (see /xwiki/bin/view/XWiki/XWikiClasses and http://dev.xwiki.org/xwiki/bin/view/Drafts/DatabaseListProperties ) > 4- Assuming we can define models that allow for these sorts of things, are > there easy/standard ways to display such fields contents, as well as ways > for end-users to specify fillers (e.g. list/tree pickers of existing objects > of the desired type)? > Although not the Xwiki-officially-blessed technique, I like to use Exhibit for this purpose: http://simile-widgets.org/exhibit/ http://people.csail.mit.edu/dfhuynh/research/papers/www2007-exhibit.pdf Some examples of my own using Xwiki: http://nielsmayer.com/trainspodder-prototype.jpg (coming to the internets real soon now) http://nielsmayer.com/xwiki/bin/view/Exhibit/NPRpods3 (work in progress/old code) http://nielsmayer.com/xwiki/bin/view/Exhibit/Presidents4 (demo of Xwiki integration) http://nielsmayer.com/xwiki/bin/download/Exhibit/Presidents4/Presidents4Pkg.xar(source including Exhibit&jQuery "Macros") -- Niels http://nielsmayer.com _______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users