<
From version < 57.5 >
edited by Vincent Massol
on 2015/04/03
To version < 57.7 >
edited by Eduard Moraru
on 2015/04/06
>
Change comment: Uncommented the detils for the updateOrCreate save parameter

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.enygma
Content
... ... @@ -26,14 +26,15 @@
26 26  There are various ##bin## URLs. The generic format of ##bin## URLs is ##bin/<action>/<path>##. The full list of ##<action>## is defined in the Strut Configuration file (located in ##WEB-INF/struts-config##).
27 27  
28 28  Here are some well-known actions:
29 -* ##skin##: Dynamic Skin resource, e.g. ##http://<server>/xwiki/bin/skin/skins/flamingo/style.css?skin=XWiki.DefaultSkin&colorTheme=playground%3AFlamingoThemes.Charcoal## or ##http://<server>/xwiki/bin/skin/resources/uicomponents/search/searchSuggest.css##
30 -* ##jsx##: [[Javascript Skin Extension>>DevGuide.SkinExtensionsTutorial]] URL, e.g. ##http://<server>/xwiki/bin/jsx/AnnotationCode/Settings?language=en##
31 -* ##ssx##: [[StyleSheet Skin Extension>>DevGuide.SkinExtensionsTutorial]] URL, e.g. ##http://<server>/xwiki/bin/ssx/AnnotationCode/Style?language=en##
32 -* ##webjars##: URL when [[accessing some resources located in a WebJar>>extensions:Extension.WebJars Integration]], e.g. ##http://<server>/xwiki/bin/webjars/resources/path?value=requirejs%2F2.1.15%2Frequire.min.js##
33 -* ##download##: URL to access an attachment from a wiki page, e.g. ##http://<server>/xwiki/bin/download/XWiki/JohnDoe/john.png?width=30&height=30&keepAspectRatio=true##
34 -* ##view##: Display Entity content (wiki, page, space, attachment, object, property, etc) with the skin applied, e.g. ##http://<server>/xwiki/bin/view/Sandbox/WebHome##
35 -* ##edit##: Edits wiki content (page, object, property, etc), e.g. ##http://<server>/xwiki/bin/edit/Sandbox/WebHome##
36 -* ##get##: Accessing Entity content (wiki, page, space, attachment, object, property, etc) without any skin applied, e.g. ##http://<server>/xwiki/bin/get/Main/WebHome?xpage=xpart&vm=commentsinline.vm##. The ##get## action should be used to render the content of the page and nothing else (mainly used for code pages). This action is similar to the ##view## action, but without the UI and with "text/plain" mime type set by default for the response.
29 +
30 +* ##skin##: Dynamic Skin resource, e.g. ##http:~/~/<server>/xwiki/bin/skin/skins/flamingo/style.css?skin=XWiki.DefaultSkin&colorTheme=playground%3AFlamingoThemes.Charcoal## or ##http:~/~/<server>/xwiki/bin/skin/resources/uicomponents/search/searchSuggest.css##
31 +* ##jsx##: [[Javascript Skin Extension>>DevGuide.SkinExtensionsTutorial]] URL, e.g. ##http:~/~/<server>/xwiki/bin/jsx/AnnotationCode/Settings?language=en##
32 +* ##ssx##: [[StyleSheet Skin Extension>>DevGuide.SkinExtensionsTutorial]] URL, e.g. ##http:~/~/<server>/xwiki/bin/ssx/AnnotationCode/Style?language=en##
33 +* ##webjars##: URL when [[accessing some resources located in a WebJar>>extensions:Extension.WebJars Integration]], e.g. ##http:~/~/<server>/xwiki/bin/webjars/resources/path?value=requirejs%2F2.1.15%2Frequire.min.js##
34 +* ##download##: URL to access an attachment from a wiki page, e.g. ##http:~/~/<server>/xwiki/bin/download/XWiki/JohnDoe/john.png?width=30&height=30&keepAspectRatio=true##
35 +* ##view##: Display Entity content (wiki, page, space, attachment, object, property, etc) with the skin applied, e.g. ##http:~/~/<server>/xwiki/bin/view/Sandbox/WebHome##
36 +* ##edit##: Edits wiki content (page, object, property, etc), e.g. ##http:~/~/<server>/xwiki/bin/edit/Sandbox/WebHome##
37 +* ##get##: Accessing Entity content (wiki, page, space, attachment, object, property, etc) without any skin applied, e.g. ##http:~/~/<server>/xwiki/bin/get/Main/WebHome?xpage=xpart&vm=commentsinline.vm##. The ##get## action should be used to render the content of the page and nothing else (mainly used for code pages). This action is similar to the ##view## action, but without the UI and with "text/plain" mime type set by default for the response.
37 37  * ##export##: Exports wiki pages to various formats (PDF, HTML, etc). See [[platform:Features.Exports]].
38 38  * ##viewrev##: This action is the same as the ##view## action but allowing to address a given revision of the document asked.
39 39  
... ... @@ -42,8 +42,9 @@
42 42  The additional URL paths for the ##view## action is ##<space>/<page>?<query string>##.
43 43  
44 44  Examples:
45 -* ##http://<server>/xwiki/bin/view/Sandbox/WebHome##: Views the ##Sandbox.WebHome## page.
46 46  
47 +* ##http:~/~/<server>/xwiki/bin/view/Sandbox/WebHome##: Views the ##Sandbox.WebHome## page.
48 +
47 47  Here are some of the supported query string parameters.
48 48  
49 49  === Parameter: ##xpage## ===
... ... @@ -65,7 +65,7 @@
65 65  
66 66  === Parameter: ##rev## ===
67 67  
68 -The version to get, e.g. ##2.3## in ##http://<server>/xwiki/bin/viewrev/MySpace/MyPage?rev=2.3##
70 +The version to get, e.g. ##2.3## in ##http:~/~/<server>/xwiki/bin/viewrev/MySpace/MyPage?rev=2.3##
69 69  
70 70  == Action: ##save## ==
71 71  
... ... @@ -72,37 +72,54 @@
72 72  The additional URL paths for the ##save## action is ##<space>/<page>?<query string>##.
73 73  
74 74  Examples:
75 -* ##http://<server>/xwiki/bin/save/Sandbox/WebHome##: Save the ##Sandbox.WebHome## page.
76 76  
78 +* ##http:~/~/<server>/xwiki/bin/save/Sandbox/WebHome##: Save the ##Sandbox.WebHome## page.
79 +
77 77  Here are some of the supported query string parameters.
78 78  
79 79  === Parameter: ##creator## ===
83 +
80 80  Change the creator of the current page. Should be a string as a Document Reference like ##JohnDoe##, ##XWiki.JohnDoe## or ##xwiki:XWiki.JohnDoe## which is a page containing an ##XWiki.Users## object.
81 81  
82 82  === Parameter: ##language## ===
87 +
83 83  Will target a specific language. You must use a specific 2-letters code (see [[I18N>>http://platform.xwiki.org/xwiki/bin/view/Features/I18N]]).
84 84  
85 85  === Parameter: ##objectPolicy## ===
91 +
86 86  There is a possibility to give some custom query string parameters (see [[Custom Parameters>>#HCustomParameters]]). ##objectPolicy## parameter is a configuration parameter that will decide what to do with these custom parameters:
87 -* ##update##: each custom parameter will update property in an existing objects of the current page. If the custom parameters refers to a property or an object that doesn't exist, it simply ignore it.
88 -{{comment}}
89 -* ##updateOrCreate##: each custom parameter will update property in an existing objects of the current page. If the custom parameters refers to a property that doesn't exist, it will ignore it. If the custom parameter refers to an object that doesn't exist, it will create it (and pad will ##null## objects if needed); for example, if there is already 2 objects ##XWiki.XWikiRights## in the page, ##XWiki.XWikiRights_0_levels## and ##XWiki.XWikiRights_1_levels## will update these existing objects. ##XWiki.XWikiRights_2_levels## and ##XWiki.XWikiRights_3_levels## will create 2 new objects. ##XWiki.XWikiRights_42_levels## will be created and 37 empty objects too (42 minus the 4 already existing and minus the 42th which will be created).
90 -{{/comment}}
91 91  
94 +* ##update##
95 +** Each custom parameter will update a property in an existing object of the current page.
96 +** If the custom parameter refers to a property or an object that don't exist, it will simply ignore it.
97 +* ##updateOrCreate##
98 +** Each custom parameter will update a property in an existing object of the current page.
99 +** If the custom parameter refers to a property that doesn't exist, it will ignore it.
100 +** If the custom parameter refers to an object that doesn't exist, it will create it (and pad will ##null## objects if needed).(((
101 +//Example//: If there is already 2 objects ##XWiki.XWikiRights## in the page, ##XWiki.XWikiRights_0_levels## and ##XWiki.XWikiRights_1_levels## will update these existing objects. ##XWiki.XWikiRights_2_levels## and ##XWiki.XWikiRights_3_levels## will create 2 new objects. ##XWiki.XWikiRights_42_levels## will be created and 37 empty objects too (42 minus the 4 already existing and minus the 42th which will be created).
102 +//Note//: All this information about empty/null objects is currently an implementation detail of how we currently handle object numbers and it may be subject to future change so, as much as possible, do not rely on it and, instead, use the public available APIs to handle these things.
103 +)))
104 +
92 92  === Parameter: ##parent## ===
106 +
93 93  Allows you to set the parent of the page. Should be a string as a Document Reference like ##WebHome##, ##Main.WebHome## or ##xwiki:Main.WebHome##.
94 94  
95 95  === Parameter: ##syntaxId## ===
110 +
96 96  Specify which syntax is used for the content of the current page (see [[Supported syntaxes>>http://rendering.xwiki.org/xwiki/bin/view/Main/#HSupportedSyntaxes]]).
97 97  
98 98  === Parameter: ##template## ===
114 +
99 99  Allows you to have a specific template to apply for the current page. Should be a string as a Document Reference like ##MyTemplate##, ##Main.MyTemplate## or ##xwiki:Main.MyTemplate##.
100 100  
101 101  === Parameter: ##title## ===
118 +
102 102  Allows you to modify the title of the page.
103 103  
104 104  === Custom Parameters ===
122 +
105 105  Custom parameters have the format ##<Space>.<ClassPage>_<number>_<propertyname>## (e.g. ##XWiki.XWikiUsers_0_password## or ##XWiki.WatchListClass_3_interval##):
124 +
106 106  * ##<Space>## must refer to an existing space of the wiki
107 107  * ##<ClassPage>## must refer to a class
108 108  * ##<number>## is a positive number
... ... @@ -109,11 +109,13 @@
109 109  * ##<propertyname>## is a name of a property of the class ##<Space>.<ClassPage>##
110 110  
111 111  == Action: ##inline## ==
131 +
112 112  The additional URL paths for the ##inline## action is ##<space>/<page>?<query string>##.
113 113  
114 114  Examples:
115 -* ##http://<server>/xwiki/bin/inline/Sandbox/WebHome##: Edit in inline mode the ##Sandbox.WebHome## page.
116 116  
136 +* ##http:~/~/<server>/xwiki/bin/inline/Sandbox/WebHome##: Edit in inline mode the ##Sandbox.WebHome## page.
137 +
117 117  For the supported query string parameters, you can refer to the [[##save## action>>#HAction:save]].
118 118  
119 119  == Action: ##get## ==
... ... @@ -127,13 +127,14 @@
127 127  = Type: ##wiki## =
128 128  
129 129  The format is ##wiki/<wiki name>/<bin subpath>## where:
151 +
130 130  * ##<wiki name>##: the name of the subwiki, e.g. ##platform##.
131 -* ##<bin spath>##: the same path as for the ##bin## action (see above). For example, if you use ##http://<main wiki server>/xwiki/bin/download/XWiki/JohnDoe/john.png## you would use ##http://<main wiki server>/xwiki/wiki/<subwiki name>/download/XWiki/JohnDoe/john.png## to access the same attachment but located in a subwiki named ##<subwiki>##.
153 +* ##<bin spath>##: the same path as for the ##bin## action (see above). For example, if you use ##http:~/~/<main wiki server>/xwiki/bin/download/XWiki/JohnDoe/john.png## you would use ##http:~/~/<main wiki server>/xwiki/wiki/<subwiki name>/download/XWiki/JohnDoe/john.png## to access the same attachment but located in a subwiki named ##<subwiki>##.
132 132  
133 133  = Type: ##resources## =
134 134  
135 -Static template resources, e.g. ##http://<server>/xwiki/resources/js/prototype/prototype.js##.
157 +Static template resources, e.g. ##http:~/~/<server>/xwiki/resources/js/prototype/prototype.js##.
136 136  
137 137  = Type: ##skins## =
138 138  
139 -Static skin resources, e.g. ##http://<server>/xwiki/skins/flamingo/logo.png##.
161 +Static skin resources, e.g. ##http:~/~/<server>/xwiki/skins/flamingo/logo.png##.

Get Connected