06-27-2013 06:31 PM
var ctx =Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var qname = Packages.org.alfresco.service.namespace.QName;
var def = Packages.org.alfresco.service.cmr.dictionary;
var ns = Packages.org.alfresco.service.namespace.NamespaceService;
var iterator = Packages.java.util.Iterator;
//var ListOfValuesConstraint = new Packages.org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint;
var dictionaryService = ctx.getBean("DictionaryService");
The Web Script /alfresco/service/sita/projserv/projservregister/ has responded with a status of 500 - Internal Error.
500 Description: An error inside the HTTP server which prevented it from fulfilling the request.
Message: 05280246 Wrapped Exception (with status template): 05281343 Failed to execute script '/Project And Service Register/projservregister.get.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 05281342 ReferenceError: "Packages" is not defined. (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js#1)
Exception: org.mozilla.javascript.EcmaError - ReferenceError: "Packages" is not defined. (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js#1)
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3350)
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3340)
org.mozilla.javascript.ScriptRuntime.notFoundError(ScriptRuntime.java:3413)
org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1612)
org.mozilla.javascript.gen.c66._c0(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js:1)
org.mozilla.javascript.gen.c66.call(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js)
org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:2834)
org.mozilla.javascript.gen.c66.call(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js)
org.mozilla.javascript.gen.c66.exec(workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:492)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:198)
org.alfresco.repo.processor.ScriptServiceImpl.execute(ScriptServiceImpl.java:212)
org.alfresco.repo.processor.ScriptServiceImpl.executeScript(ScriptServiceImpl.java:174)
org.alfresco.repo.web.scripts.RepositoryScriptProcessor.executeScript(RepositoryScriptProcessor.java:102)
org.springframework.extensions.webscripts.AbstractWebScript.executeScript(AbstractWebScript.java:1305)
org.springframework.extensions.webscripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:86)
org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:417)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:401)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:479)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:517)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:333)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:377)
org.springframework.extensions.webscripts.AbstractRuntime.executeScript(AbstractRuntime.java:209)
org.springframework.extensions.webscripts.servlet.WebScriptServlet.service(WebScriptServlet.java:132)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.alfresco.web.app.servlet.GlobalLocalizationFilter.doFilter(GlobalLocalizationFilter.java:61)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:877)
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:594)
org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1675)
java.lang.Thread.run(Thread.java:662)
Exception: org.alfresco.error.AlfrescoRuntimeException - 05281342 ReferenceError: "Packages" is not defined. (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js#1)
org.alfresco.repo.jscript.RhinoScriptProcessor.executeScriptImpl(RhinoScriptProcessor.java:516)
Exception: org.alfresco.scripts.ScriptException - 05281343 Failed to execute script '/Project And Service Register/projservregister.get.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 05281342 ReferenceError: "Packages" is not defined. (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js#1)
org.alfresco.repo.jscript.RhinoScriptProcessor.execute(RhinoScriptProcessor.java:202)
Exception: org.springframework.extensions.webscripts.WebScriptException - 05280246 Wrapped Exception (with status template): 05281343 Failed to execute script '/Project And Service Register/projservregister.get.js (in repository store workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions)': 05281342 ReferenceError: "Packages" is not defined. (workspace://SpacesStore/Company Home/Data Dictionary/Web Scripts Extensions/Project And Service Register/projservregister.get.js#1)
org.springframework.extensions.webscripts.AbstractWebScript.createStatusException(AbstractWebScript.java:1067)
06-28-2013 01:39 AM
06-28-2013 03:07 AM
06-28-2013 04:16 AM
<webscript>
<shortname>Hello</shortname>
<description>Polite greeting</description>
<url>/sample/dropdown</url>
<authentication>user</authentication>
</webscript>
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var model = Packages.org.alfresco.model.ContentModel;
var dictionaryService = ctx.getBean("DictionaryService");
var types = dictionaryService.getSubTypes(model.TYPE_CONTENT, true).toArray();
model.yrsearch = types;
<table>
<tr>
<td>
<#assign props = yrsearch.properties?keys>
<select name="idRequest" id="idRequest">
<option value="NOT SELECTED" selected="selected">[–SELECT YEAR–]</option>
<#list props as t>
<option value="${t}">${t}</option>
</#list>
</select>
</td>
</tr>
</table>
06-28-2013 06:47 AM
var ctx = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
06-30-2013 04:58 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.