Page 1 of 1

how pass parameters in ChangeAttributesOperation

Posted: Mon Sep 12, 2022 12:37 pm
by shikhar_472
Hi Oxygen Team,

I want to use ChangeAttributesOperation and on button click i want to add multiple attributes, could you please help me how to pass the parameters in name and value.
I want to pass multiple attribute name and attribute values.For example--

actionsManager.invokeOperation(
'ro.sync.ecss.extensions.commons.operations.ChangeAttributesOperation', {
name: '["image-key","location"]',
value: '[attImageKey,attLocation]'
}, function(e, result) {
disposeInlineViewDialog(inlineEmbededImageDialog);
})

}


Thanks,
Shikhar.

Re: how pass parameters in ChangeAttributesOperation

Posted: Mon Sep 12, 2022 1:42 pm
by cristi_talau
Hello,
The documentation for the operation is here: https://www.oxygenxml.com/doc/versions/ ... soperation .
According to it, the invocation should look like:

Code: Select all

actionsManager.invokeOperation(
  'ro.sync.ecss.extensions.commons.operations.ChangeAttributesOperation', {
    attributeNames: 'image-key\nlocation',
    values: 'attImageKey\nattLocation'
}, function() { /* ... */})
Best,
Cristian