update multi valued properties

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2011 06:18 AM
Hi,
I want to upload a multiple properties via webscript. Itried with
if my property in the model is:
And I have another question, can I refresh the uicontext through webscript?something like the method "contextUpdated" on browsebean?
Thanks in advanced,
Ana
I want to upload a multiple properties via webscript. Itried with
content.properties["myModel:myProperty"]=value;
but this code always overwrited the property, not added a new value.if my property in the model is:
<property name="myModel:myProperty"> <type>d:text</type> <mandatory>false</mandatory> <multiple>true</multiple></property>
How can add the value on the webscript?And I have another question, can I refresh the uicontext through webscript?something like the method "contextUpdated" on browsebean?
Thanks in advanced,
Ana
Labels:
- Labels:
-
Archive
1 REPLY 1

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2011 04:57 AM
I answer myself,
To update the multi valued property you must use an array
Something like this
Hope that someone find it useful.
Regards,
Ana
To update the multi valued property you must use an array
Something like this
var array = new Array();array = content.properties["myModel:myProperty"];var index_arr= array .length;array [index_arr]=new_property;content.properties["myModel:myProperty"]=array ;
Hope that someone find it useful.
Regards,
Ana
