Hi,
Component Alfresco Aikau Widgets seen doen'st work on share-header-get.js (Select list is empty and no error)
code :
var siteService = widgetUtils.findObject(model.jsonModel, "id", "SITE_SERVICE");
if (siteService && siteService.config) {
// #################################################
// ### customize site popup
// #################################################
siteService.config.widgetsForCreateSiteDialogOverrides = [
// call webscript for listbox
{
id : "site-departement",
name : "alfresco/forms/controls/Select",
// name : "alfresco/forms/controls/MultiSelectInput",
targetPosition : "BEFORE",
targetId : "CREATE_SITE_FIELD_TITLE",
config : {
fieldId : "site-departement",
label : "label here",
name : "departement",
description : "comment here",
optionsConfig : {
queryAttribute : "shortName",
publishTopic : "ALF_GET_FORM_CONTROL_OPTIONS",
publishPayload : {
url : page.url.context + "/proxy/alfresco/api/groups/ALFRESCO_ADMINISTRATORS/children",
resultsProperty : "options",
itemsAttribute : "data",
labelAttribute : "displayName",
valueAttribute : "shortName"
}
}
}
}
];
}
The list box keep empty. The only error i found is on client side : "TypeError: this.options is null" (need to active debug on alfresco share).
Have you any idea?
thx
I tried another ways and this code doesn't work too :
var conn2 = remote.connect("alfresco");
var repoResponse2 = conn2.get("/xx/site/departement");
var jsonResponse = JSON.stringify(eval("(" + repoResponse2 + ")"));
where jsonResponse equals :
[{"label":"DEP1","value":"01"},{"label":"DEP2","value":"02"},...]
And AIKAU component :
{
id : "CREATE_SITE_FIELD_DEPARTEMENT",
name : "alfresco/forms/controls/Select",
targetPosition : "BEFORE",
targetId : "CREATE_SITE_FIELD_TITLE",
config : {
fieldId : "CREATE_SITE_FIELD_DEPARTEMENT",
label : "Département du site",
name : "departement",
optionsConfig : {
fixed : jsonResponse
}}
And... ListBox is empty...
If i replace optionsConfig by :
optionsConfig : {
fixed : [ {
label : "Red",
value : "RED"
}, {
label : "Green",
value : "GREEN"
}, {
label : "Blue",
value : "BLUE"
} ]
}
Listbox work...
Have you some issue for this bug?
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.