I'm trying to add some extra functionality to the site creation
form of Alfresco 5 by creating a web script
. I'm creating a jar file containing the module extension.
I have successfully modified the actual site creation for by adding a new site type (this was done for testing purposes only). I did this by adding the following to the extension-module.xml
file:
<module>
<id>Create Site Extension</id>
<version>1.0</version>
<customizations>
<customization>
<targetPackageRoot>org.alfresco.modules</targetPackageRoot>
<sourcePackageRoot>create-site</sourcePackageRoot>
</customization>
</customizations>
</module>
/config/alfresco/web-scripts/create-site.get.js
model.sitePresets.push({
id: "site-test",
name: "TEST"
});
When added to tomcat/webapps/share/WEB-INF/lib
and activated through the Alfresco module management page it works perfectly. I can see TEST
in the list of site types.
I'm trying to do the exact same type of thing but with create-site.post.json.js
. No matter what I do, I can't get my create-site.post.json.js
web-script to fire. Is it possible to extend the .post.json.js
file for create-site
?
UPDATE In case anyone wants to look at the raw source, here it is: Module Srouce
Everything in the module works correctly except for the create-site.post.json.js
. I know for a fact that the deleteDashboard
method inside the .post.json.js file works correctly and it's what I've been using to attempt to debug the script (in case the debugger was running it but not breaking into it for some reason. If it runs, it should delete the test site "good-site"'s dashboard so if it worked, the dashboard will be empty/nonexistent.