11-27-2017 08:26 AM
Hi,
i have a set of action/handler create on 3.x version and i would like use this. But with alfresco 5.x 'run action wizard' not exist. I have see many post but always talk about run by rules. In my case is it not good, user need to launch from button/menu but i don't see code or just call to run action.
Have you an idea?
best regards
Noel
12-11-2017 12:09 AM
i have try many code with AlfMenuItemMixin without succes. I cannot get display, alle menu is display without this entry :
if (headerMenu != null) {
logger.log("find HEADER_APP_MENU_BAR");
headerMenu.config.widgets.push({
id: "HEADER_ACTION_LINK",
name: "alfresco/menus/AlfMenuBarPopup",
config: {
id: "HEADER_ACTION_LINK",
label: "header.menu.actions.label",
widgets :[
{
id: "HEADER_ACTION_inline-editable_BUTTON",
name: "alfresco/menus/AlfMenuItemMixin",
config:
{
id: "HEADER_ACTION_inline-editable_BUTTON",
label: "header.item.inline-editable",
iconClass: "delete-16",
propertyToRender: "title",
altText: "??",
publishTopic: "ALF_CRUD_POST",
publishPayloadType: "PROCESS",
publishPayload: {
requiresConfirmation: true,
url: "share/proxy/alfresco/api/actionQueue",
confirmationTitle: "Launch action",
confirmationPrompt: "Are you sure you want to launch '{title}'?",
successMessage: "Successfully launch '{title}'"
},
publishPayloadModifiers: ["processCurrentItemTokens", "convertNodeRefToUrl"]
....
Have you an idea of my error?
12-11-2017 04:14 AM
I did not say to literally use "alfresco/menus/AlfMenuItemMixin". The "alfresco/header/AlfMenuItem" you used initially is an extension of "alfresco/menus/AlfMenuItemMixin" and as such supports publishing events. So, simply use "alfresco/header/AlfMenuItem" and configure that with the publish topic etc.
Note that "propertyToRender" is inapplicable to any element in a menu. You also cannot expect "processCurrentItemTokens" to work, because the header menu does not have a "currentItem" state variable.
I can only advise to work through the Aikau tutorial and to use the JSDoc of the modules to better understand them.
Explore our Alfresco products with the links below. Use labels to filter content by product module.