On Fri, May 10, 2013 at 8:05 AM, Guofeng Zhang <[email protected]> wrote:
> Hi,
>
> I am new to XWiki. I use XWiki 5.0.1.
>
> I following FAQ tutorial to create my first app. Finally I make it work but 
> there is some little difference comparing with what described in the 
> tutorial(http://platform.xwiki.org/xwiki/bin/view/DevGuide/FAQTutorialManual)
>
> After clicked "CREATE THE DOCUMENT SHEET", the tutorial said I should add 
> XWiki.SheetClass object to my sheet page. Then it told me Click on the 
> "CREATE THE DOCUMENT TEMPLATE" button and add in wiki mode the following code:
> {{include document="FAQ.FAQClassSheet"/}}
> But after finished these steps, the app not works.
>
> Instead I did the following:
>
> (a)    after click  CREATE THE DOCUMENT SHEET, I clicked Bind the sheet to 
> the class.
>
> (b)   after click  CREATE THE DOCUMENT TEMPLATE, I clicked Add a FAQ class to 
> the template.
> I find that after (a), the document sheet contain the similar code listed on 
> the tutorial . But after (b), the document template does not contain any 
> explicit code like {{include document= "FAQ.FAQ...."}}.
>
> My Questions:

> 1. is what I did right? That is, XWiki 5.0.1 make our life easier.

If you refer to (a) and (b) then yes you did the right thing. For (a)
you can edit the class with the object editor to see the
ClassSheetBinding object, or you can follow the sheet link and edit
it in wiki mode to see the sheet code. For (b) you can follow the
template link and edit it with the object editor to see that it now
has an object of type FAQClass.

> 2. am I luck that my app works, I mean, will add {{include....}} is a 
> mandatory for the document template?
>      If I needed to add {{include...}} in the document template, should the 
> document name be "FAQ.FAQClassSheet" or "FAQ.FAQSheet" ( the name on my page 
> is "FAQ.FAQSheet")?

No luck. That's the way it is supposed to work. The {{include ...}} is
the old way of applying a sheet to a document (as Caty said, the
tutorial is a bit outdated). You don't need it if you binded the class
to the sheet. See
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module for
more details.

Hope this helps,
Marius

>
> Thanks for your help!
>
> Guofeng
>
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to