Le 11 janv. 08 à 23:42, Paul Libbrecht a écrit :
while editing my class, I felt at least two places where the database type appeared too convoluted to me (and I needed sample code) and where the only thing I'd need is the reference to a document in some space of the same XWiki.Does this exist ? Should I file a feature request ?
I did not see an answer to this and only made a bit of progress. Here's an example that helps to explain where I want to go:Let me start with an example: we have a space called "Licenses". I want the people that fill the resources to use a pop-up menu to choose among the licenses that are in this space.
So the resources have a property of type database-list which I populate with an HQL that lists all licenses
select doc.name, doc.title from com.xpn.xwiki.doc.XWikiDocument as doc where doc.web = 'Licenses' and doc.name!='WebHome'the pop-up menu shows nicely the title of the documents as visible choice and the name's of the documents as value choices.
Now, I would like, in the presentation of our resources, to write the title of the license property with a link to its document.
Unfortunately object.license is a string which is the "visible name". Where has gone the value ?Further, I would like to present a localized name, so that the translation of the title and document is used if viewed with a different language.
thanks for hintsI really like the idea of "documents as values", it is very semantic- web-like...
paul
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users