You are missing an object of instance EssaiClass in EssaiClassTemplate.
Use "edit objects" to add it.
Ludovic
Xavier MOGHRABI wrote:
Hi all,
I'd like to create a forms using XWiki and that my data may be stored into the
database.
Thus I try to create a XWiki Class.
First to test a small example, I just create a Class with the Class Editor
(XWiki/XWikiClasses). I've named my class Main.EssaiClass.
I keep the default configuration.
I added 2 string attributes to the class named "a" and "b".
XWiki.EssaiClass contains the following code :
#set( $class = $doc.name.substring(0,$doc.name.indexOf("Class")))
#set($defaultparent = "XWiki.${class}Class")
#set($defaultweb = "Main")
#includeForm("XWiki.ClassSheet")
XWiki.EssaiClassSheet :
1 Document $doc.name
## Change class name to your class name
#set($class = $doc.getObject("XWiki.EssaiClass").xWikiClass)
<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>
XWiki.EssaiClassTemplate :
#includeForm("XWiki.EssaiClassSheet")
Now I can see my class in the ClassEditor. However If Y create a new document
such as Main.TestDoc I can just see the title of the document. No form is
displayed :-(
Did I something wrong ?
Regards
------------------------------------------------------------------------
--
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
--
Ludovic Dubost
XPertNet:
http://www.xpertnet.fr/
Blog:
http://www.ludovic.org/blog/
XWiki:
http://www.xwiki.com
Skype: ldubost AIM: nvludo Yahoo: ludovic