Hello,

I'm looking for advice about a way to add some tags on saved page with class.
What I have:
- a sheet page with an object Class ( with an object class + properties) + a 
template page
- a velocity code in a page AddMyTag to add some tags on  some page with this 
URL parameters:
$!request.PageSource, $!request.ClassName

What I'm trying to do, is: when a user save a page, a tag is added. The tag to 
add is coming from a properties value (last character on property name is _Tag).
If I call my 'AddMyTag' page, tags are correctly added on PageSource.

To resume:
- the user save HisPage
- HisPage add tags from a properties value (name xxx_Tag) 

My problem is "how can I launch" automaticelly my 'AddMyTag' page when a user 
record PageSource?
I tried with Ajax with
document.observe("xwiki:actions:save", function(event){ 
(http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI#HActionevents28actionButtons.js29)
 but the problem is: sometime  xxx_Tag property value is updated after my AJAX 
call (and the old tag is attached on page).

A the moment, I'm looking for another way, I read 
http://extensions.xwiki.org/xwiki/bin/view/Extension/WikiComponent+Module
But documentation indicate: "The goal is to listen ... DocumentUpdatingEvent 
events (note that these events are fired before the page is saved and thus our 
code doesn't need to perform the save itself ..."
Then I can not use this method either because I must add tag from new value 
from my _Tag properties.

How can I launch a velocity script on a document after document is saved (to 
add some tag from the document itself)?

Thxs for any help

Pascal B




_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to