Hi All,I have a SimplePicker widget, the sample code is shown below,
var imageLibraryPicker = {
name : "alfresco/forms/controls/SimplePicker",
config : {
label : "Pick Image Libraries",
description : "This is a simple picker publishes a request to get data to display",
visibilityConfig : {
initialValue : false,
rules : [ {
targetId : "SHOW_OTHER_FIELDS",
is : [ true ]
} ]
},
name : "imageLibraries",
noItemsMessage: "No Libraries Available!",
loadDataPublishTopic : "ALF_CRUD_GET_ALL",
loadDataPublishPayload : {
url : "retrieve-library-list?retrieve=Image%20Library"
},
itemsProperty : "imageLibrariesList.image",
itemKey : "prop_cm_name",
propertyToRender : "prop_cm_name",
availableItemsLabel : "Available",
pickedItemsLabel : "Currently Selected"
}
};
My Sample JSON Nested Array response rendered by my webscript URL http://localhost:8080/alfresco/service/retrieve-library-list?retrieve=Image%20Library
is,
{
"imageLibrariesList": [
{
"image": [
{
"prop_cm_name": "Images1"
},
{
"prop_cm_name": "Images2"
}
]
},
{
"background": [
{
"prop_cm_name": "Background2"
},
{
"prop_cm_name": "Background1"
}
]
},
{
"stock": [
{
"prop_cm_name": "Stock1"
},
{
"prop_cm_name": "Stock2"
}
]
},
{
"photo": [
{
"prop_cm_name": "Photo1"
},
{
"prop_cm_name": "Photo2"
}
]
},
{
"graphics": []
}
]
}
I was expecting Images1
and Images2
would be rendering as per the above configuration, but it is not rendering anything and showing Could not load properties
Can someone let me know, is there anything wrong in my JSON response or the way I access itemsProperty : "imageLibrariesList.image"
.Thanks in Advance,