how pass parameters in ChangeAttributesOperation

Questions about XML that are not covered by the other forums should go here.
shikhar_472
Posts: 99
Joined: Fri Jul 01, 2022 12:08 pm

how pass parameters in ChangeAttributesOperation

Post 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.
cristi_talau
Posts: 494
Joined: Thu Sep 04, 2014 4:22 pm

Re: how pass parameters in ChangeAttributesOperation

Post 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
Post Reply