Skip to Content
0
May 26, 2021 at 12:12 PM

Disable field(s) in backoffice based on a property in admin console

355 Views Last edit Jun 30, 2021 at 12:17 PM 3 rev

I have a property , for example : disable.mediaFolder.field , which can be set to true in hybris admin console or local.properties. When I load custom context corresponding to backoffice, I want to disable the fields based on this property.

Ex:

<wz:content id="step1.content">

<wz:property-list root="abc" merge-mode="replace">

<wz:property qualifier="name" type="java.lang.String" />

<wz:property qualifier="mediaFolder" type="Media" editor="com.ab.mediafoldereeditor"/> </wz:property-list> => disable this

</wz:content>

Please let me know if this is possible by injection of any bean , or any other way

Tried this approach:

<editorArea:attribute qualifier="xyz" readonly="spring.getBean('configurationService').getConfiguration().getBoolean('make.me.readonly')"/>