[xwiki-devs] Trouble Accessing Database List Elements
Hi All, I am creating a new Class using the 'AppWithinMinutes' dialogue that will hold information on projects. Within which I am trying to add a Database List. This list is supposed to enable users that are creating a new 'Project' page to link the page with one or more 'Clients' (each 'Client' has its own page within a 'Clients' space). I can get a list of all the clients from which the user can select from using the following HQL: "select doc.name, doc.name from XWikiDocument as doc where doc.space = 'Clients' and doc.name <> 'WebHome' and doc.name <> 'ClientsClass' and doc.name <> 'ClientsTemplate' and doc.name <> 'ClientsSheet' and doc.name <> 'WebPreferences' order by doc.name" however the returned list is just text, and i would like it if they were 'links' to the actual Client Page. Is this even possible? as i've been search for hours! Thanks in advance. Rob Southwell Professional Services Helyx SIS Ltd M: 07762 767575 T: 01684 273725 F: 01684 853430 E: [email protected]<mailto:[email protected]> W: www.helyx.co.uk<http://www.helyx.co.uk/> Registered in England No: 04464638. Registered Office: Millennium House, 65 Walton Street, Aylesbury, Buckinghamshire, UK, HP21 7QG DISCLAIMER AND CONFIDENTIALITY NOTICE The content of this email (and any attachments to it) is confidential and may contain privileged information. It is intended solely for the use of the individual(s) or entity to which it is addressed. If you are not an intended recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information on any medium. The views expressed in this e-mail are those of the individual and not necessarily the views or opinions of Helyx SIS Ltd. Please note that the author of this e-mail is not authorised to conclude any contract on behalf of Helyx SIS Ltd by e-mail.
Hi Robert, yes, it's possible, but you need to develop a bit yourself. You have 2 choices: 1/ you modify the sheet and, for this specific property, you display a link instead of the value 2/ you make a custom displayer for your property in the class (as described here http://extensions.xwiki.org/xwiki/bin/view/Extension/User+Property+Custom+Di... ) and you display, in the case of the view, a link instead of the value. This would be the nicer choice. Note that, as far as I know, both of these mean going out of the app within minutes framework so you need to do some tests and check what happens when you re-generate your application on modifications of the class, for example, with app within minutes, if your changes are overwritten or not. Happy xwikiing, Anca On 02/11/2013 04:35 PM, Robert Southwell wrote:
Hi All,
I am creating a new Class using the 'AppWithinMinutes' dialogue that will hold information on projects. Within which I am trying to add a Database List. This list is supposed to enable users that are creating a new 'Project' page to link the page with one or more 'Clients' (each 'Client' has its own page within a 'Clients' space).
I can get a list of all the clients from which the user can select from using the following HQL:
"select doc.name, doc.name from XWikiDocument as doc where doc.space = 'Clients' and doc.name<> 'WebHome' and doc.name<> 'ClientsClass' and doc.name<> 'ClientsTemplate' and doc.name<> 'ClientsSheet' and doc.name<> 'WebPreferences' order by doc.name"
however the returned list is just text, and i would like it if they were 'links' to the actual Client Page. Is this even possible? as i've been search for hours!
Thanks in advance.
Rob Southwell Professional Services Helyx SIS Ltd
M: 07762 767575 T: 01684 273725 F: 01684 853430 E: [email protected]<mailto:[email protected]> W: www.helyx.co.uk<http://www.helyx.co.uk/> Registered in England No: 04464638. Registered Office: Millennium House, 65 Walton Street, Aylesbury, Buckinghamshire, UK, HP21 7QG DISCLAIMER AND CONFIDENTIALITY NOTICE The content of this email (and any attachments to it) is confidential and may contain privileged information. It is intended solely for the use of the individual(s) or entity to which it is addressed. If you are not an intended recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information on any medium. The views expressed in this e-mail are those of the individual and not necessarily the views or opinions of Helyx SIS Ltd. Please note that the author of this e-mail is not authorised to conclude any contract on behalf of Helyx SIS Ltd by e-mail.
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thanks Anca, i'll try your suggestions. -- View this message in context: http://xwiki.475771.n2.nabble.com/Trouble-Accessing-Database-List-Elements-t... Sent from the XWiki- Dev mailing list archive at Nabble.com.
participants (3)
-
Anca Luca -
Robert Southwell -
RobSouthwell