Hi,
I have created a class with the script on the document
'XWiki.XWikiClasses'. The new class is called
- Cook.RecipeClass with three properties
* recipe
* ingredients
* description
- Cook.RecipeClassTemplate
<!-- replace MyName with the real class name -->
<!-- save this template using the save button at the top left -->
#includeForm("Cook.RecipeClassSheet")
- Cook.RecipeClassSheet
<!-- you can modify this page to customize the presentation of your
object -->
<!-- at first you should keep the default presentation -->
<!-- save this template using the save button at the top left -->
<!-- Change "title" to a field name contained in your Class -->
#set($class = $doc.getFirstObject("recipe").xWikiClass)
1 Kochrezept: $doc.name
<table border="1" cellspacing="0" cellpadding="2">
#foreach($prop in $class.properties)
<tr><td> *${prop.prettyName}* </td>
<td>$doc.display($prop.getName())</td>
</tr>
#end
</table>
If I now try to create a document with the form on Cook.RecipeClass
the document (e.g. Cook.Test) shows a new page with the following URL
xwiki/bin/inline/Cook/NameOfYourDocument?parent=Cook.RecipeClass&template=Cook.RecipeClassTemplate&sheet=1&webname=Cook&name=Test
On this page the header 'Kochrezept: Test' is shown but no table with
the properties. I can't see why it isn't working.
Any idea what's wrong.
Bye
Frank
--
Dipl. Inform. Frank Häfemeier <frank(a)haefemeier.net>
----------------------------------------------------