You probably need to add an object of the RecipeClass to the
RecipeClassTemplate. Go to the RecipeClassTemplate page and click More
actions -> Edit Objects. Choose the RecipeClass from the class list and
click the button. So whenever the RecipeClassTemplate page is used as a
template, you also get a new RecipeClass object.
Frank Haefemeier <frank(a)haefemeier.net> wrote on 08/18/2005 04:35:32 PM:
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>
----------------------------------------------------
--
You receive this message as a subscriber of the xwiki-
users(a)objectweb.org mailing list.
To unsubscribe: mailto:xwiki-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page:
http://www.objectweb.org/wws