1. Add a new Action (com.xpn.xwiki.web.AnnotationAction). You can adapt it from Comment
I createdd a new Action com.xpn.xwiki.AnnotationAddAction adapted from CommentAddAction And i did all the others steps but i have an error when calling my method: java.lang.NoSuchMethodError I have few questions about this method: * isResponseCorrect = captchaPluginApi.verifyCaptcha("param"); What should be referenced by "param"? * I have substituated BaseClass baseclass = xwiki.getCommentsClass(context); by BaseClass baseclass = xwiki.getClass("XWiki.AnnotationClass", context); * xwiki.saveDocument(doc, context.getMessageTool().get("param"),true,context); Again, What should be referenced by "param"?
2. In <webapp-root>/WEB-INF/struts-config.xml add the AnnotationAction and map it to /annotate/ 3. In com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl#getRight add: actionMap.put("annotate", "comment"); 4. Compile the modified XWikiRightServiceImpl and either replace the existing class from xwiki-core-*.jar, or put it in <webapp-root>/WEB-INF/classes/com/xpn/xwiki/user/impl/xwiki/ Or you can just rebuild the whole xwiki-core.
That's a lot of changes, and I don't like it. This is why I'd like to be able to: - Hook rights from plugins, without having to change and recompile core classes - Add actions without having to change struts-config.xml
-- Sergiu Dumitriu http://purl.org/net/sergiu/ _______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
Thank for your time