AnsweredAssumed Answered

Multi-select on Search result page with dynamic select/option values

Question asked by dharmendra.panday@gmail.com on Sep 7, 2018

Aikau Search Result Page - 

 

I have a requirement to Edit the bulk documents metadata on search result page, where I want to have the dynamic drop down and select values should be from cataegory list of alfresco categories.

I can add the drop down select values (hardcoded) and works fine for me but do not know how to add dynamic list value..

 

I have already developed this feature for document liberary and works fine where I have custom ftl template, since search pages are based on Aikau and I do not know how to make a dynamic list/select, 

 

Here is my code snippets...

 

var url = "bulk/edit/action/";
me.alfServicePublish(topics.CREATE_FORM_DIALOG, {
dialogId: "BULK_UPDATE_CONTACT_DIALOG",
dialogTitle: Alfresco.util.message("Bulk Update Contact"),
formSubmissionTopic: "ALF_CRUD_CREATE",
formSubmissionGlobal: true,
showValidationErrorsImmediately: false,

formSubmissionPayloadMixin: {
url: url,
nodeRef: documents
},
widgets:
[
{
name: "alfresco/forms/controls/Select",
config: {
fieldId: "BULK_UPDATE_FIELDS_OPTION",
label: Alfresco.util.message("Metadata Field"),
name: "metadataName",
optionsConfig: {
fixed: [

{

           label: Alfresco.util.message("Name"), value: Alfresco.util.message("cm_name")},
{          label: Alfresco.util.message("Contact Person"), value: Alfresco.util.message("trid_contact")}

]}}},{
name: "alfresco/forms/controls/TextBox",
config: {
label: Alfresco.util.message("Field Value"),
name: "metadataValue",
cols: "50",
rows: "10",
requirementConfig: {
initialValue: true
},
validationConfig: [{
validation: "minLength",
minLength: "3",
errorMessage: Alfresco.util.message("Field value is missing!")}]}}]});

},});

 

 

Any help and suggestion would be appriciated..

 

Thanks

Dharmendra

Outcomes