Wiki source code of FrontendResources

Version 16.1 by Silvia Macovei on 2010/02/25

Hide last authors
Silvia Macovei 16.1 1 = Front-end Resources =
Guillaume Lerouge 1.1 2
Silvia Macovei 16.1 3 {{info}}This section is a work in progress.{{/info}}
Guillaume Lerouge 4.1 4
Jerome 6.1 5 This sections aims to document all the front-end resources available in XWiki for application developers and for developers of the XWiki products. Front-end resources are of two main types:
Silvia Macovei 16.1 6
Jerome 6.1 7 * External Libraries
8 * Internal components (Based or not on some of the external libraries)
Jerome 5.1 9
Jerome 6.1 10 Front-end resources are mainly composed of JavaScript libraries, CSS stylesheets and their corresponding HTML reusable snippets (or velocity macro to output this snippet), and velocity macros.
11
Silvia Macovei 16.1 12 Some of the resources presented in here are not included by default with all HTML-rendered wiki pages (it would be a lot too much things to send to the client!), you have to request their inclusion from a skin template or from the wiki page itself using the ##jsfx## plugin. For example, to request the inclusion of scriptaculous slider library, you can write, in [[XWiki Syntax 1.0>>Main.XWikiSyntax]]:
Jerome 11.1 13
Silvia Macovei 16.1 14 {{code}}$xwiki.jsfx.use("js/scriptaculous/slider.js"){{/code}}
Jerome 11.1 15
Silvia Macovei 16.1 16 In [[XWiki Syntax 2.0>>Main.XWikiSyntax]]:
Jerome 11.1 17
Silvia Macovei 16.1 18 {{code}}
Jerome 11.1 19 {{velocity}}
20 $xwiki.jsfx.use("js/scriptaculous/slider.js")
21 {{/velocity}}
Silvia Macovei 16.1 22 {{/code}}
Jerome 11.1 23
Silvia Macovei 16.1 24 The path you indicate to the ##jsfx## plugin is the relative path where the library can be found under the ##resources## directory of the XWiki webapp. Similarly to the ##jsfx## plugin, there is a ##ssfx## plugin that can be used to request the inclusion of CSS stylesheets files.
Jerome 11.1 25
Silvia Macovei 16.1 26 == External resources ==
Jerome 6.1 27
Jerome 11.1 28 External resources are third party libraries bundled with the XWiki webapp as resources developers can use for their in-wiki applications or to enhance the wiki itself. Almost all of the (except prototype.js) are not included by default in HTML-rendered wiki pages.
29
30 Hereunder is a table presenting some of the external libraries XWiki comes with:
31
Silvia Macovei 16.1 32 {{velocity filter="none"}}
33 {{html clean="false" wiki="true"}}
Jerome 9.1 34 <table>
35 <tbody>
36 <tr>
Jerome 10.1 37 <td width="50%">
Jerome 9.1 38 <img src="$doc.getAttachmentURL('prototype.gif')" /><br />
Silvia Macovei 16.1 39 [[Prototype>>http://prototypejs.org||target=_blank]] is a <em>"JavaScript framework that aims to ease development of web applications"</em>. It extends the JavaScript native objects and browser objects providing utilities for Ajax, OOP-style classes, and so much more. Prototype is the only JavaScript library that is systematically shipped with any wiki page in XWiki.
Jerome 9.1 40 </td>
41 <td>
42 <img src="$doc.getAttachmentURL('smartclient.png')" /><br />
Silvia Macovei 16.1 43 [[Smartclient>>http://www.smartclient.com/]] is an AJAX RIA system to easily develop rich interface components. Using it in XWiki, you can build powerful front-end widgets that can leverage [[XWiki's RESTful API>>Features.XWikiRESTfulAPI]].
Jerome 9.1 44 </td>
45 </tr>
46 </tbody>
47 </table>
Silvia Macovei 16.1 48 {{/html}}
49 {{/velocity}}
Jerome 9.1 50
Jerome 6.1 51 * Scriptaculous
Jerome 5.1 52 * YUI
53
Silvia Macovei 16.1 54 == Internal resources ==
Guillaume Lerouge 1.1 55
Silvia Macovei 16.1 56 === Front-end Components ===
Jerome 12.2 57
Silvia Macovei 16.1 58 * [[Modal Popup>>ModalPopup]]
59 * [[Confirmation Box>>ConfirmationBox]]
60 * [[LiveTable]]
61 * [[Auto Suggest Widget>>DevGuide.AutoSuggestWidget]]
Jerome 12.2 62
Silvia Macovei 16.1 63 === JavaScript resources ===
Jerome 11.2 64
Silvia Macovei 16.1 65 * [[JavaScriptAPI]]
66 * [[XWiki RESTFul API>>Features.XWikiRESTfulAPI]]
Jerome 11.2 67
Silvia Macovei 16.1 68 === StyleSheet resources ===
Jerome 11.2 69
Silvia Macovei 16.1 70 * [[Pagination>>Pagination]]
71 * [[Result List>>ListOfResults]]
72 * [[Search Box>>SearchBox]]
73 * [[Suggest Box>>SuggestBox]]

Get Connected