This is a draft about XWiki URLs and Forms mappings


  • document xpage, xredirect, ajax parameters
  • split in two docs : XWiki URLS / XWiki Forms 
Invalid macro parameters used for the "toc" macro. Cause: [Failed to validate bean: [must be greater than or equal to 1]]. Click on this message for details.

XWiki Actions

This section presents XWiki actions. 

view action

Rendering of a document

Possible redirections

  • viewrev action, when the rev request parameter exists and its value is not empty.

Templates forwarded

Rendered templateCase
docdoesnotexist.vmThe asked document does not exist in the wiki
.vmThe asked document exists and has a default template field filled-in
view.vmNormal case (document exists, has no default template)

viewrev action

Rendering of a particular version of a document. The revision is precised with the rev request parameter (1.1 if not precised)

Rendered templateCase
exception.vmThe asked revision does not exists. Exception message set to the 'revisiondoesnotexist' translation message.
view.vmNormal case : the asked revision exists, and is rendered. Note that in this case, the Drafts.XWikiURLMappings variable is set to that particular revision, which might differ from the lastest one.

viewattachrev action

View a list of version for a particular document attachment

A valid URL for this action should be formed one of the following way :

  • /xwiki/bin/viewattachrev/Space/Document/filename.ext

    Where filename.ext is the filename of the attachment to display the existing versions of.


  • /xwiki/bin/viewattachrev/Space/Document?id=N

    Where N is attachment number in the document's attachment list.

Rendered templateCase
exception.vmNo attachment could be found for the request (via filename or attachment id). Exception message set to the 'attachmentdoesnotexist' translation message.
viewattachrev.vmNormal case : an attachment has been found.

export action

export a wiki page or a set of wiki pages in a various possible formats


XWiki Forms Parameters

Edit form parameters

The edit form is used by several actions to feed a document from request/form parameters.

Parameter nameDescription
contentThe content of the document
webThe space of the document verify it can be used
nameThe name of the document
parentThe document full name of the parent document (like Main.WebHome)
templateThe document to be copied as a template
default_templateThe velocity template to be used to render the document in view mode. ("view.vm" is used when this field is not filled).
creatorThe creator document's full name (like XWiki.JohnDoe)
languageThe language of the document
titleThe title of the document
commentThe comment associated with the currently edited/saved version of the document
default_languageThe default language to be used by the document in case of a multilingual document
tagsThe tags associated with the document (multiple values possible)
forceForce a possible lock with the value "1"
minor_editSet the edit as minor if this parameter exists

Property Add form parameters

Parameter nameDescription
propnameThe name of the property to be added
proptypeThe class name of the property to be added to the XWiki Class. Possible values are :
  • com.xpn.xwiki.objects.classes.DateClass
  • com.xpn.xwiki.objects.classes.DBListClass
  • com.xpn.xwiki.objects.classes.DBTreeListClass
  • com.xpn.xwiki.objects.classes.GroupsClass
  • com.xpn.xwiki.objects.classes.LevelsClass
  • com.xpn.xwiki.objects.classes.ListClass
  • com.xpn.xwiki.objects.classes.ListItem
  • com.xpn.xwiki.objects.classes.NumberClass
  • com.xpn.xwiki.objects.classes.PasswordClass
  • com.xpn.xwiki.objects.classes.StaticListClass
  • com.xpn.xwiki.objects.classes.StringClass
  • com.xpn.xwiki.objects.classes.TextAreaClass
  • com.xpn.xwiki.objects.classes.UsersClass

Rollback form parameters


Delete versions form parameters

Parameter nameDescription
rev1First revision to delete
rev2Last revision to delete
confirm0: ask form confirmation; 1: don't ask



Alternative reset

With the reset action you delete the entire history at once.


Object Add form

Mandatory parameter

Parameter nameDescription
classnameThe full name of the document that holds the class which the object to be added should be instance of. Example : XWiki.XWikiGroups

Initializing the object properties (optional)

The added object can also have its properties initialized through this form. The parameter names should be formed as follow : classname_fiedname ; where classname is the value given to the previously mentioned classname parameter, and fieldname is the name of the field to initialize. A valid example of such a parameter would then be : XWiki.XWikiGroups_member (provided that XWiki.XWikiGroups has been given for the mandatory classname parameter).

Object Remove form parameters

Parameter nameDescription
classnameThe full name of the document that holds the class which the object to be remove is instance of. Example : XWiki.XWikiUsers
classidThe object id of the object to be deleted. Example : "0", or "1"

Sample use cases

TBD. Example to illustrate formentioned concepts. Ex: Ajax request to add and init an object


Get Connected