XWiki Development Zone » Draft Documents » XWiki Explorer Widget Documentation

XWiki Explorer Widget Documentation

Last modified by Jean-Vincent Drean on 2009/03/31 17:29

XWiki Explorer Widget Documentation

Introduction

Since XWiki Enterprise 1.8.1, XWiki provide a JavaScript widget (based on SmartClient TreeGrid widget) that allows to browse a XWiki instance. This widget can be configured to allow browsing of a farm, a wiki or a space.

Configuration parameters

NameType (Values)
wikiString ("all" or the name of a wiki database)
spaceString (the name of a space within the wiki)
pageString (the name of a page within the space)
displaySuggestboolean (true to display a suggest field at the bottom)
displayLinksboolean (true to display links in tree nodes)
displayAttachmentsboolean (true to display attachments under page nodes)
displayAttachmentsOnTopboolean (true to display attachments before children nodes)

Examples

Prerequisites

First you need to copy the following javascript includes:

## Smartclient
$xwiki.jsfx.use("js/smartclient/initsc.js", true)##
$xwiki.jsfx.use("js/smartclient/modules/ISC_Core.js")##
$xwiki.jsfx.use("js/smartclient/modules/ISC_Foundation.js")##
$xwiki.jsfx.use("js/smartclient/modules/ISC_Containers.js")##
$xwiki.jsfx.use("js/smartclient/modules/ISC_Grids.js")##
$xwiki.jsfx.use("js/smartclient/modules/ISC_Forms.js")##
$xwiki.jsfx.use("js/smartclient/modules/ISC_DataBinding.js")##
$xwiki.jsfx.use("js/smartclient/skins/Enterprise/load_skin.js")##
## XWikiExplorer
$xwiki.jsfx.use("js/xwiki/xwikiexplorer/xwikiexplorer.js", true)##

Farm

<div id="XWEWrapper" style="height:300px;margin-right:20px;padding-bottom:30px;"></div>
<script>
isc.XWETreeGrid.create({
  defaultValue: "",
  htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
  dataSource: isc.XWEDataSource.create({}),
}).draw();
</script>

Wiki

isc.XWETreeGrid.create({
  defaultValue: "",
  htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
  dataSource: isc.XWEWikiDataSource.create({}),
}).draw();

Space

isc.XWETreeGrid.create({
  defaultValue: "",
  htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
  dataSource: isc.XWESpaceDataSource.create({ space: "Main" }),
}).draw();

Page

isc.XWETreeGrid.create({
  defaultValue: "",
  htmlElement: "XWEWrapper", // Mandatory HTML wrapper.
  dataSource: isc.XWEPageDataSource.create({ space: "Main", page: "WebHome" }),
}).draw();
Tags:
Created by Jean-Vincent Drean on 2009/03/31 14:18