Hi,
you might find it simpler to look at this example to understand how an
XWiki application works:
Guillaume
On Wed, Mar 28, 2012 at 07:05, Sergiu Dumitriu <sergiu(a)xwiki.com> wrote:
On 03/27/2012 11:36 PM, du du wrote:
Hi, all
I am studying the BlogClass, BlogPostClass, I checked the Blog.BlogCode,
there are alot of velocity scripts, I can see the search documents from
db,
but could not find any code related to insert document records into
database, so how is the document created from blog saved into database?
please point me to the script code in the Blog.BlogCode.
The XWiki platform is the one that handles most of the stuff. Document
creation, editing and removal are platform features. An XWiki application
will never have to issue database INSERT statements, and will rarely even
have to manually use $doc.save() to trigger changes manually.
Form data is sent to the /save/ action, which corresponds to a Struts
action, and which is written in Java (SaveAction). If you go further down
into the code, you'll go through XWikiDocument.readFromForm,
XWiki.saveDocument, XWikiHibernateStore.**saveXWikiDoc, and here you
leave XWiki and go into other libraries like Hibernate, JDBC, C3P0.
Please don't cross-post user questions to the devs list.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
______________________________**_________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/**mailman/listinfo/users<http://lists.xwiki.org/m…