I would like to know if it's possible to use AdminPresentationOverrides to hide a field in a complex hierarchy, example of hierarchy :
- ProductImpl
- MyProductImpl extends ProductImpl
- MyVirtualProduct extends MyProductImpl
- MyPhysicalProduct extends MyProductImpl
I would like to hide a field present in ProductImpl (defaultSku.inventoryType), but i would like to display the field if my product is an instanceof MyPhysicalProduct.
What i have done :
On MyProductImpl :
Code: Select all
@AdminPresentationOverrides(value = {
@AdminPresentationOverride(name = "defaultSku.iventoryType", value = @AdminPresentation(excluded = true))
})
@AdminPresentationClass(friendlyName = "MyProduct", populateToOneFields = PopulateToOneFieldsEnum.TRUE)
public abstract class MyProductImpl extends ProductImpl {}
On MyPhysicalProduct
Code: Select all
@AdminPresentationOverrides(value = {
@AdminPresentationOverride(name = "defaultSku.iventoryType", value = @AdminPresentation(excluded = false))
})
@AdminPresentationClass(friendlyName = "MyPhysicalProduct ", populateToOneFields = PopulateToOneFieldsEnum.TRUE)
public abstract class MyPhysicalProduct extends ProductImpl {}
But unfortunately it doesn't work. Is there a mean to make it works?
Thanks in advance