Avoiding code duplication when modifying/overriding CMS behavior

Hello,

I am trying to modify the toolbar action buttons when editing a piece of content (Save, Save & Close), to add a third option that replicates the close button behaviour you get on the bottom tabs.

53

I’ve managed to achieve what I want by copying /hippo-cms/workflow/frontend/src/main/java/org/hippoecm/frontend/plugins/reviewedactions/EditingWorkflowPlugin.java from the hippo-cms source into my project and modifying it (essentially adding behaviour copied from hippo-cms/api/src/main/java/org/hippoecm/frontend/plugins/standards/tabs/TabsPlugin.java), but I have concerns about how future-proof that will be. Is there a better way to achieve this without duplicating so much code from the hippo-cms source into my project?

Many thanks,

Jonathan Sutcliffe

I suggest you file an improvement request for the UI. The main problem I see is that any UI tends to be the most volatile part of software. Expect this to be a burden. Nor can it be guaranteed that your customizations will keep working in the future.

I agree with Jasper. Maintaining this code over time will be a burden. I think having that button there is a good idea. I created the JIRA issue for you: https://issues.onehippo.com/browse/CMS-11372

You can create an account in our JIRA and watch the issue and you will be kept informed about its progress.