Hello, a quick question about the Topics in Aikau
when I click publish on a simple button it's working perfect
****************
aikau code :
name: "alfresco/buttons/AlfButton",
config: {
publishTopic: "REDRACCOON"
}
results in logs :
Object {type: "PUBLICATION", topic: "REDRACCOON", payload: Object, publisherId: "alfresco_buttons_AlfButton___7b2f8a01-5fd4-473f-8d96-0d50763de145", publisher: Object}
****************
but now let's try in a simple form
****************
aikau code :
name : "alfresco/forms/Form",
config : {
okButtonPublishTopic : "REDRACCOON",
widgets : [ ]
}
results in logs :
Object {type: "PUBLICATION", topic: "0a785910-a2a8-4b51-8988-edf6e9334b390a785910-a2a8-4b51-8988-edf6e9334b39REDRACCOON", payload: Object, publisherId: "uniqName_1_76", publisher: Object
****************
with the bad topic I can't intercept my payload
I'm making this post because I often went trought this without understanding why sometimes the topic is changed like this ?
I remember having the same issue with topic on "_valueChangeOf_" before but can't remember how I fixed and I really would like to get the mechanics
Thank you
Solved! Go to Solution.
a random prefix for the scope is generated to be shure that all of your widgets inside your form are saff and together, you can desactivate this option with
scopeFormControls: true
Or better solution rename this random scope with pubSubScope
name : "alfresco/forms/Form",
config : {
pubSubScope : "fixedPrefixScope",
okButtonPublishTopic : "REDRACCOON",
widgets : [ ]
}
in the source I found this wich might be the solution,
/** * Indicates that the a new pubSubScope should be generated for this widget so that it's * form controls will be scoped to only communicate with this instance and not "pollute" * any other forms that may also be on the page. * * @instance * @type {boolean} * @default */
scopeFormControls: true,
It's really usefull (without this scope I couldn't use requirementConfig: {initialValue: true} but still don't know how to intercept my topic with a random value
a random prefix for the scope is generated to be shure that all of your widgets inside your form are saff and together, you can desactivate this option with
scopeFormControls: true
Or better solution rename this random scope with pubSubScope
name : "alfresco/forms/Form",
config : {
pubSubScope : "fixedPrefixScope",
okButtonPublishTopic : "REDRACCOON",
widgets : [ ]
}
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.