AnsweredAssumed Answered

Use type d:any in a Webscript

Question asked by dranakan on Jul 22, 2009
Latest reply on Oct 9, 2009 by rsulliv1
Hello :)

Can someone give me an example or link to use the type "d:any" in a Webscript ? The type "d:any" can store Java Object. I would like to store an array of int.

In Java, it's easy to add value.

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);

How can I get these properties in a Webscript ? (Do you have the syntaxe to get the result in a ftl file ?)  :?:
I take value like this :


<#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 ?
How can I show this value with the web-client-config ?  :?:

Thanks

Outcomes