Unable to Delete Table Rows and Columns with Tracked Changes

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
dreifsnider
Posts: 147
Joined: Thu Aug 30, 2018 10:06 pm

Unable to Delete Table Rows and Columns with Tracked Changes

Post by dreifsnider »

Hello,

We've received feedback from our Web Author users that they are unable to delete table rows and columns when tracked changes is enabled. I've been able to replicate this and see the following error dialog:
image.png
image.png (21.88 KiB) Viewed 1416 times
Is this by design, and if so, is there a way to change this behavior to enable our users to be able to delete table rows and columns and capture it as a tracked change?

Additionally, are there any other restrictions when tracked changes is enabled?

Thank you!

Daniel
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by mihaela »

Hello,

Indeed, the delete row operation is not executed when the change tracking is activated. This is the default behavior and it can be changed.
The DeleteRowOperation that is used when a row is deleted has an argument called changeTrackingBehavior, having the following possible values (the default is Auto):
image.png
image.png (33.23 KiB) Viewed 1403 times
So, in case you use a custom framework you should change this arguments value to "Allow".
In case you use a built-in framework you should first extend this framework and then change the value of "changeTrackingBehavior" argument.
Please let us know if you need to provide more details for one of the cases above.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
dreifsnider
Posts: 147
Joined: Thu Aug 30, 2018 10:06 pm

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by dreifsnider »

Hi Mihaela,

Thank for you the details! I was able to modify the changeTrackingBehavior argument to Allow for the delete.table.row operation and it now works as expected.

However, it seems that the delete.table.column operation does not have a changeTrackingBehavior argument, but Web Author still prevents a user from deleting a table column when tracked changes it turned on. Is there a way to also enable this for the delete.table.column operation?
image.png
image.png (72.98 KiB) Viewed 1372 times
image.png
image.png (93.53 KiB) Viewed 1372 times
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by mihaela »

Hello,

There is no similar argument for the delete column operation.
The problem is that the layout of the table may become broken if the cells are deleted with track changes.
What you can do is create your own delete column operation (maybe extend the default one) that turns off the track changes [1] [2] [3] before deleting the column (and then restores the track changes state).

[1] https://www.oxygenxml.com/InstData/Edit ... gChanges()
[2] https://www.oxygenxml.com/InstData/Edit ... kChanges()
[3] https://www.oxygenxml.com/InstData/Edit ... ntroller()

Best regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
jimrubin
Posts: 7
Joined: Thu Sep 07, 2023 3:38 am

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by jimrubin »

Hi Mihaela,

Thanks for explaining this design. Could you tell us the exact class we are extending and method we are overriding.

thanks,
Jim
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by mihaela »

Hello,

I found a simple way that you can use to allow delete column with track changes:
- you can extend ro.sync.ecss.extensions.commons.table.operations.cals.DeleteColumnOperation (I see this in your screeshot so it seems that this is what you are using ) and implement getArguments() to expose "changeTrackingBehavior" argument:

Code: Select all

  /**
   * @see ro.sync.ecss.extensions.api.AuthorOperation#getArguments()
   */
  @Override
  public ArgumentDescriptor[] getArguments() {
    return new ArgumentDescriptor[] {
        CHANGE_TRACKING_BEHAVIOR_ARGUMENT
    };
  }
- then, when you use this operation in the UI, set its value to "Allow".

I will add an issue in our internal issues tracking system to allow setting "changeTrackingBehavior" also for the default operation.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
jimrubin
Posts: 7
Joined: Thu Sep 07, 2023 3:38 am

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by jimrubin »

Thanks for sending this Mihaela. We implemented this on our test server. We are testing to see if we have any complex tables that get corrupted if tracked changes is on when a column is deleted.
cosminef
Site Admin
Posts: 197
Joined: Wed Aug 30, 2023 2:33 pm

Re: Unable to Delete Table Rows and Columns with Tracked Changes

Post by cosminef »

Hello,

Thank you for testing this on your end. Could you please keep us updated on your testing results, particularly if you encounter any issues with complex tables when tracked changes is enabled and a column is deleted?

Best,
Cosmin
Cosmin Eftenie
www.oxygenxml.com
Post Reply