Displaying details of documents
This Web Script will accept a string from a user, will search for documents with that name, and finally will display the details of all those documents.
How to do it...
1. We will have to create new files for the Web Script, let's name this script as
documentdetails
.2. Open a text editor and create a new file with this code:
<webscript> <shortname>Document Details</shortname> <description>Searches document(s) and displays details of all the documents.</description> <url>/com/infoaxon/docdetails</url> <format default="html"/> <authentication>user</authentication> <transaction>required</transaction> </webscript>
3. Save the file with the name
docdetails.get.desc.xml
in the\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\com\infoaxon
folder. This is our Web Script descriptor file.4. Now we create the JavaScript controller file. Here is the code:
function main() {...