Hi Moritz,
On Mon, Apr 23, 2012 at 1:27 PM, Moritz Hesse (EA GmbH)
<moritz.hesse(a)ea-gmbh.de> wrote:
Hi,
as I am new to XWiki I am trying to gain some inspiration and ideas how to
successfully use it for our business purposes.
I have created an app (application within a minute) to organize and manage
our projects. We have designed a structure of fix sub-wikipages, which we
want to attach to every application item.
Example: let's say we have a project #123 and some metainformation like
project leader etc. which is all organized in the application fields. And
now we want some subpages like 1. project-todos, project-documentation,
project-log etc.
What possible ways do exist to automatize the creation of the subpages, so
that each time I create a project item in that app, all the predefined
subpages will be created by the system.
I don't expect you to write me the complete solution. But I would really
appreciate if you could just drop some buzzwords or some links, that point
me the proper direction.
I know two ways to achieve what you want:
(1) Use the observation module. You can write an event listener that
is called each time a new document is created. See
http://platform.xwiki.org/xwiki/bin/view/DevGuide/GroovyNotificationTutorial
for a tutorial on how to do this, and
http://extensions.xwiki.org/xwiki/bin/view/Extension/Title+Post+Processing+…
as a simple example.
(2) Customize the sheet used to create application entries/items. You
can modify the HTML form to post to the same page and thus catch the
save action and perform there additional stuff. This is a bit more
complicated and has the downside that you won't be able to update the
sheet when you edit the application (e.g. add new field) because you
would loose your custom changes. If you don't know what a sheet is,
see
http://extensions.xwiki.org/xwiki/bin/view/Extension/Sheet+Module
. If your application is named Foo, then on the FooClass page (which
holds the application structure/fields) you'll find a link to the
sheet.
Hope this helps,
Marius
Thanks in advance,
best regards,
Moritz
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users