Page 1 of 1

How to hide @AdminPresentationMapField from admin?

Posted: Tue Jul 29, 2014 6:39 am
by Brdloush
Hi,

I'd like to ask whether there's any way to hide some field @AdminPresentationMapField, so that it's not shown in admin.

for example there's protected Map<String, Media> skuMedia in SkuImpl class and within it there's following field defined:

@AdminPresentationMapField(
fieldName = "primary

I'd like to get rid of it, but it doesn't seem that it can be done using the "@AdminPresentationMergeOverrides" and similar annotations in my custom sku subclass.

Thanks for any tips.

Re: How to hide @AdminPresentationMapField from admin?

Posted: Tue Jul 29, 2014 1:48 pm
by phillipuniverse
Originally I was thinking that you could accomplish this with the 'fieldPresentation' property of @AdminPresentationMapField but it doesn't look like you can override that property.

You could try to override it by just setting the excluded property within @AdminPresentationMergeOverrides:

Code: Select all

@AdminPresentationMergeOverrides(
    {
        @
AdminPresentationMergeOverride(name "skuMedia"mergeEntries =
            @
AdminPresentationMergeEntry(propertyType PropertyType.AdminPresentation.EXCLUDED,
                                            
booleanOverrideValue true))
    }
)
 


but I'm not sure if that would work. If it doesn't work, could you open an issue at https://github.com/BroadleafCommerce/Br ... rce/issues?

Re: How to hide @AdminPresentationMapField from admin?

Posted: Sun Jun 07, 2015 11:32 pm
by rudy
Faced the same problem.
Using above solution excludes the whole Media from the SKU.

Need some solution for removing only the "primary" field from admin panel.

Re: How to hide @AdminPresentationMapField from admin?

Posted: Wed Jun 17, 2015 2:04 pm
by phillipuniverse
Unfortunately we don't have a way to remove these individual map fields. Can you open an issue for this at https://github.com/BroadleafCommerce/Br ... rce/issues?