Change comment:
Document converted from syntax xwiki/1.0 to syntax xwiki/2.0
Summary
-
Page properties (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. VincentMassol1 +XWiki.SilviaRusu - Syntax
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki 1.01 +XWiki 2.0 - Content
-
... ... @@ -1,12 +1,16 @@ 1 - 1Best Practices1 += Best Practices = 2 2 3 - #toc("" "" "")3 +{{toc start="" depth="" numbered=""/}} 4 4 5 - 1.1Checkfor ObjectexistenceinClass Sheets documents5 +== XWiki Application Organization == 6 6 7 +This [[Best Practices document>>Best Practices XWiki Application Organization]] explains how to best organize an XWiki Application. 8 + 9 +== Check for Object existence in Class Sheets documents == 10 + 7 7 Class sheet documents should be written using the following construct (this is an example for displaying documents containing XWiki.XWikiUsers objects): 8 8 9 -{code} 13 +{{code}} 10 10 #set($obj = $doc.getObject("XWiki.XWikiUsers")) 11 11 #if(!$obj) 12 12 1 User Sheet ... ... @@ -15,8 +15,6 @@ 15 15 1 $msg.get("userProfile", [$xwiki.getUserName($doc.fullName, false)]) 16 16 ... 17 17 #end 18 -{code} 22 +{{/code}} 19 19 20 -#info("The 'if' tests first for the non existence. This is so that XWiki extract the title from the ~~1 User Sheet~~, which is a proper title to display when viewsing the sheet page, instead of the computed name which will usually display something wrong.") 21 - 22 - 24 +{{info}}The 'if' tests first for the non existence. This is so that XWiki extract the title from the //1 User Sheet//, which is a proper title to display when viewsing the sheet page, instead of the computed name which will usually display something wrong.{{/info}}