cancel
Showing results for 
Search instead for 
Did you mean: 

Payload not being passed when using vertical/horizontal widget

anand_mohan
Champ in-the-making
Champ in-the-making
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"
}
}
}
]
}


}
}]

};
1 REPLY 1

anand_mohan
Champ in-the-making
Champ in-the-making
I got the resolution. I have to use ControlRow widget to get the data pass to payload object. So I wrapped all elements in multiple control rows and it passes on the values to payload. Most probably horizontal and vertical widgets do not work with payload.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.