I am using Alfresco 6.2 Enterprise version. I have a requirement which calls for a couple of modifications in https://dev.alfresco.com/resource/docs/aikau-jsdoc/AlfSearchList.js_.html module.
- What is the best approach to override the
onScopeSelectionfunction? - Is there a way I can modify
searchPayloadto include a new attribute?
I have gone through Alfresco documentation and couldn not figure out what's the best way to override an existing aikau.
The best option to override a function in Aikau is typically to extend the widget module in question and use module "class hierarchy" to override the function inherited from the AlfSearchList. The OOTBee Support Tools project has an example of a module extending
AlfListand overriding itsonDataLoadSuccessfunction. Once you have your own custom module, you can use a Surf Extension Module to customise the JSON model of the faceted search page to change the name of the module used for the search list to yours.Unfortunately there is no other way to modify the
searchPayloadother than overriding theloadDatafunction as well. And then the added attribute would not do anything unless you also override the SearchService'sonSearchRequestfunction and used your custom service instead of the default by again modifying the JSON model of the page.