Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -103,12 +103,10 @@ 103 103 {{image reference="FAQClass2.PNG"/}} 104 104 ))) 105 105 * Click the first button ("Create the document sheet") to create the document sheet (the Page Design Sheet). This sheet determines how your page's objects will be rendered to the user. The document is automatically created. 106 -* Click on "View the sheet document" 107 -* Edit that page in Object mode (make sure your user is an [[Advanced user>>platform:Features.PageEditing||anchor="HAdvancedMode"]]) 108 -* Add a XWiki.SheetClass object to the page 109 -** **Adding the XWiki.SheetClass object is important. It's because of this object that users will be sent to form edition mode when editing FAQ entries** 110 -* Click "Save & View" 111 -* If you edit the page in wiki mode, you will see the following code:((( 106 +* You should see a warning message with the text "The sheet is not bound to the class so it won't be applied automatically when a page that has an object of this class is displayed". Click the "Bind the sheet to the class" link that appears after the text. **What this does is important**: 107 +** It adds an object of type ##XWiki.ClassSheetBinding## to the ##FAQ.FAQClass" document. Basically it ties the FAQ Class to the Sheet. 108 +** **It's because of this object that users will be sent to form edition mode when editing FAQ entries** 109 +* Now click on "View the sheet document". This takes you to the ##FAQ.FAQSheet## page which you can edit in wiki mode and see its default content:((( 112 112 {{code language="none"}} 113 113 {{velocity}} 114 114 ## You can modify this page to customize the presentation of your object. ... ... @@ -123,7 +123,7 @@ 123 123 {{/code}} 124 124 )))Let's take a moment now and analyze this code: 125 125 126 -* The first line retrieves the FAQ.FAQClass from the wiki 124 +* The first line retrieves the ##FAQ.FAQClass## from the wiki 127 127 * Then we iterate through all its properties and display their values for the current document in a definition list. 128 128 129 129 As we mentioned, XWiki provides a mechanism that helps us create sheets used for both View and Edit mode. ... ... @@ -142,14 +142,6 @@ 142 142 143 143 * Click "Save & View" 144 144 145 -== Bind the Class to the Sheet == 146 - 147 -Next, we neet to bind our class document (FAQ.FAQClass) to this new sheet (FAQ.FAQSheet): 148 - 149 -* Edit FAQ.FAQClass in Object mode and add a new object of type XWiki.ClassSheetBinding 150 -* Type in FAQSheet inside the field 151 -* Save & View 152 - 153 153 = Create the Authoring Template = 154 154 155 155 * Click on "FAQClass" in the breadcrumb. The document should look like this:(((