Skip to content

Commit 9622abc

Browse files
committed
Fixes to the webscript tutorial for 4.2.c
1 parent 4e0b9cc commit 9622abc

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
alfresco.sdk.remote.home=/opt/alfresco/4.0c-community/sdk/lib/remote
2-
alfresco.sdk.server.home=/opt/alfresco/4.0c-community/sdk/lib/server
1+
alfresco.sdk.remote.home=/opt/alfresco/4.2c-community/sdk/lib/remote
2+
alfresco.sdk.server.home=/opt/alfresco/4.2c-community/sdk/lib/server
33
alfresco.web.root=/opt/apache/tomcat/apache-tomcat-7.0.30/webapps/alfresco

webscripts/web-script-article/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<project name="ecmarchitect.com Web Scripts Tutorial" default="deploy" basedir=".">
2+
<project name="ecmarchitect.com Alfresco Web Scripts Tutorial" default="deploy" basedir=".">
33
<property file="build.properties" />
44

55
<property name="project.dir" value="." />

webscripts/web-script-article/readme.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,3 @@ Some of the code is from two previous articles called "Alfresco Developer: Worki
55
To build the source, edit build.properties to point to your local installation of the Alfresco SDK, then run ant.
66

77
To deploy the extension files, make sure build.properties is set to reflect the location of your Alfresco webapp root, then run "ant deploy" to copy the extension directory to the Alfresco webapp extension directory.
8-
9-
The runnable command-line examples are from the Custom Content Types article. Run them as you would any other Java program. To save time, a shell script named runExample.sh has been provided that sets the classpath appropriately.

webscripts/web-script-article/src/alfresco/extension/templates/webscripts/com/someco/whitepapers/whitepapers.get.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<import resource="classpath:alfresco/extension/scripts/rating.js">
22

3+
/* this worked in 4.0.c. in 4.2.c you must specify the namespace abbreviation instead for PATH */
4+
/*
35
var whitepapers = search.luceneSearch("PATH:\"/{http://www.alfresco.org/model/application/1.0}company_home/{http://www.alfresco.org/model/content/1.0}Someco\" +TYPE:\"{http://www.someco.com/model/content/1.0}whitepaper\"");
6+
*/
7+
var whitepapers = search.luceneSearch("PATH:\"/app:company_home/cm:Someco/*\" +TYPE:\"{http://www.someco.com/model/content/1.0}whitepaper\"");
48
logger.log("Got whitepapers");
59

610
if (whitepapers == null || whitepapers.length == 0) {

0 commit comments

Comments
 (0)