07-22-2009 08:14 AM
int [] listIntTest={2,3,4,6};
Map<QName, Serializable> aspectProps = new HashMap<QName, Serializable>();
// Add the properties (the array)
aspectProps.put(QName.createQName(CustomModelItf.NAMESPACE_CUSTOM_GENERAL_MODEL_URI,CustomModelItf.PROP_sc_LISTANY),listIntTest);
// Add the aspect with its properties
nodeService.addAspect(node,QName.createQName(CustomModelItf.NAMESPACE_CUSTOM_GENERAL_MODEL_URI,CustomModelItf.ASPECT_sc_LIST),aspectProps);
…
<#if child.properties['sc:documentNb']?exists & (child.properties['sc:documentNb']?length !=0)>
<#assign val = "${child.properties['sc:documentNb']?c}"/>
<documentNb>${val}</documentNb>
</#if>But how take with an array ?07-27-2009 07:47 AM
<#if child.properties['sc:listAny']?exists>
<#assign val = [3,4,566] />
<#list val as number>${number}<#if number_has_next>,</#if></#list>
</#if>
<#if child.properties['sc:listAny']?exists>
<#assign val = child.properties['sc:listAny'] />
<#list val as number>${number}<#if number_has_next>,</#if></#list>
</#if>
500 Description: Le serveur a recontrer une erreur interne qui l''a empêché de satisfaire la requête.
Message: Wrapped Exception (with status template): Error during processing of the template 'Expected collection or sequence. val evaluated instead to freemarker.template.SimpleScalar on line 45, column 64 in org/alfresco/module/custom/searchresult/searchResults.get.html.ftl.'. Veuillez contacter votre administrateur système.
Exception: freemarker.template.TemplateException - Expected collection or sequence. val evaluated instead to freemarker.template.SimpleScalar on line 45, column 64 in org/alfresco/module/custom/searchresult/searchResults.get.html.ftl.
freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:190)
freemarker.core.Environment.visit(Environment.java:415)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:79)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IteratorBlock$Context.runLoop(IteratorBlock.java:179)
freemarker.core.Environment.visit(Environment.java:415)
freemarker.core.IteratorBlock.accept(IteratorBlock.java:102)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.IfBlock.accept(IfBlock.java:82)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.MixedContent.accept(MixedContent.java:92)
freemarker.core.Environment.visit(Environment.java:208)
freemarker.core.Environment.process(Environment.java:188)
freemarker.template.Template.process(Template.java:237)
org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:201)
org.alfresco.web.scripts.AbstractWebScript.renderTemplate(AbstractWebScript.java:505)
org.alfresco.web.scripts.DeclarativeWebScript.renderFormatTemplate(DeclarativeWebScript.java:241)
org.alfresco.web.scripts.DeclarativeWebScript.execute(DeclarativeWebScript.java:147)
org.alfresco.repo.web.scripts.RepositoryContainer$2.execute(RepositoryContainer.java:319)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:320)
org.alfresco.repo.transaction.RetryingTransactionHelper.doInTransaction(RetryingTransactionHelper.java:227)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecute(RepositoryContainer.java:368)
org.alfresco.repo.web.scripts.RepositoryContainer.transactionedExecuteAs(RepositoryContainer.java:390)
org.alfresco.repo.web.scripts.RepositoryContainer.executeScript(RepositoryContainer.java:273)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:261)
org.alfresco.web.scripts.AbstractRuntime.executeScript(AbstractRuntime.java:139)
org.alfresco.web.scripts.servlet.WebScriptServlet.service(WebScriptServlet.java:116)
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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
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:286)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
java.lang.Thread.run(Thread.java:619)
Exception: org.alfresco.service.cmr.repository.TemplateException - Error during processing of the template 'Expected collection or sequence. val evaluated instead to freemarker.template.SimpleScalar on line 45, column 64 in org/alfresco/module/custom/searchresult/searchResults.get.html.ftl.'. Veuillez contacter votre administrateur système.
org.alfresco.repo.template.FreeMarkerProcessor.process(FreeMarkerProcessor.java:205)
Exception: org.alfresco.web.scripts.WebScriptException - Wrapped Exception (with status template): Error during processing of the template 'Expected collection or sequence. val evaluated instead to freemarker.template.SimpleScalar on line 45, column 64 in org/alfresco/module/custom/searchresult/searchResults.get.html.ftl.'. Veuillez contacter votre administrateur système.
org.alfresco.web.scripts.AbstractWebScript.createStatusException(AbstractWebScript.java:595)
08-18-2009 03:06 AM
10-07-2009 06:27 PM
10-08-2009 02:33 AM
Have you made any progress with this issue?
10-08-2009 10:54 PM
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.