AnsweredAssumed Answered

Payload not being passed when using vertical/horizontal widget

Question asked by anand.mohan@nike.com on Jun 10, 2015
Latest reply on Jun 11, 2015 by anand.mohan@nike.com
Hi,

I am having issues in payload being passed from dialog box to the service subscribing it.
When I use a vertical widget and text box inside it, the payload does not have text box element value in service js but when I just use a text box (no vertical widget), the payload passes fine the value in text box. Below is the code for both. Could you please advise what am I missing?

———————————————————————–
With Vertical Widget:
———————————————————————–
var nodeRef = page.url.args.nodeRef;

model.jsonModel = {
services: [
"alfresco/services/CrudService",
"alfresco/services/DialogService",
"example/widgets/EditAssetService"
],
widgets: [{
id: "SET_PAGE_TITLE",
name: "alfresco/header/SetTitle",
config: {
title: "Edit Asset Input"
}
},

{
name: "alfresco/buttons/AlfButton",
config: {
label: "Edit Asset Property",
publishTopic: "ALF_CREATE_FORM_DIALOG_REQUEST",
publishPayloadType: "PROCESS",
publishPayloadModifiers: ["processCurrentItemTokens"],
publishPayload: {
dialogTitle: "Edit Asset Property",
dialogConfirmationButtonTitle: "Save",
dialogCancellationButtonTitle: "Cancel",
fixedWidth: true,
formSubmissionTopic: "EDIT_ASSET_PROPERTY",
widgets: [
{
id:"ASSET_EDIT_PROPERTY_MAIN_WIDGET",
name: "alfresco/layout/VerticalWidgets",
config: {
name:"ASSET_EDIT_PROPERTY_MAIN_WIDGET_NAME",
widgetMarginTop: "20",
widgetMarginBottom: "20",
widgets: [
{
id:"ASSET_EDIT_PROPERTY_ASSET_NAME",
name: "alfresco/forms/controls/TextBox",
config: {
fieldId: "Asset name",
label: "Name:",
name: "AssetName",
requirementConfig: {
initialValue: true
} ,
style: {
marginLeft: "10px"
}
}
}
]
}
}
]
}
}
}]

};

—————————————————————————————————
Without Vertical Widget:
—————————————————————————————————

var nodeRef = page.url.args.nodeRef;

model.jsonModel = {
services: [
"alfresco/services/CrudService",
"alfresco/services/DialogService",
"example/widgets/EditAssetService"
],
widgets: [{
id: "SET_PAGE_TITLE",
name: "alfresco/header/SetTitle",
config: {
title: "Edit Asset Input"
}
},

{
name: "alfresco/buttons/AlfButton",
config: {
label: "Edit Asset Property",
publishTopic: "ALF_CREATE_FORM_DIALOG_REQUEST",
publishPayloadType: "PROCESS",
publishPayloadModifiers: ["processCurrentItemTokens"],
publishPayload: {
dialogTitle: "Edit Asset Property",
dialogConfirmationButtonTitle: "Save",
dialogCancellationButtonTitle: "Cancel",
fixedWidth: true,
formSubmissionTopic: "EDIT_ASSET_PROPERTY",
widgets: [


{
id:"ASSET_EDIT_PROPERTY_ASSET_NAME",
name: "alfresco/forms/controls/TextBox",
config: {
fieldId: "Asset name",
label: "Name:",
name: "AssetName",
requirementConfig: {
initialValue: true
} ,
style: {
marginLeft: "10px"
}
}
}
]
}


}
}]

};

Outcomes