cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to control the Action buttons in BackOffice when a model change occurs (just like dynamic forms)?

Former Member
0 Likes
840

I need to disable the Delete button when selected model attributes have been set, without having to write my own java bean.

Dynamic forms do not support this.

Accepted Solutions (0)

Answers (1)

Answers (1)

mpern
Product and Topic Expert
Product and Topic Expert
0 Likes

You can configure your own custom delete action (that overrides the out-of-the-box Delete action to perform additional checks).

This of course means that some custom code is necessary...

custom-backoffice-config.xml

 <context type="MyCustomType" component="editorareaactions" >
     <y:actions>
         <y:group qualifier="common">
             <y:label>actiongroup.common</y:label>
             <y:action action-id="my.custom.action.delete" property="currentObject"/>
            <!-- other actions as necessary -->
         </y:group>
     </y:actions>
 </context>


Documentation of the out-of-the-box Delete Action:

https://help.hybris.com/1808/hcd/8bd494db866910149bf29f9ae6ff6823.html#loio8bd494db866910149bf29f9ae...

How to create an action:

https://help.hybris.com/1808/hcd/8bd494db866910149bf29f9ae6ff6823.html#loio8bd494db866910149bf29f9ae...