If you only want to display the content then a sheet like this should
do the trick:
{{velocity}}
#set ($object = $doc.getObject('Space.YourClass'))
#if ($object)
## Display object properties here (i.e. what you have right now)
...
## Display the document content.
{{include reference="$doc.documentReference" /}}
#else
This is a sheet for Space.YourClass
#end
{{/velocity}}
If you also want to edit the document content from Inline Form edit
mode then you have two options:
(1) generate a text area and load the right editor (Wiki/WYSIWYG) when
$xcontext.action == 'edit' or
(2) follow what AppWithinMinutes does when you add the "Content" field
to the sheet/class (i.e. use computed field with custom display).
In case you haven't done it yet, you should read
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module .
Hope this helps,
Marius
On Sun, Jan 12, 2014 at 11:19 PM, Nicolas Jouanin
<[email protected]> wrote:
> Hi,
>
> I’m experiencing custom class and object creation. I’ve read xwiki
> developer’s documentation to create a class and a sheet, with default
> content. Now I create some Test document and an attached object (of type the
> class I created) . The document content corresponds to the sheet content.
> Now if I add some content to Test page using the wysiwyg editor, this content
> is not displayed. Only the sheet content is displayed. Is there a may to mix,
> on page, the content of the class sheet applied to object, and the Page
> content ?
>
> Regards,
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users