cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Facet conditionally in SAP CAP CDS fiori elemetns

AakashN24
Participant
0 Kudos
267

Hi Experts,

I'm trying to disable editing in a entire facet conditionally,

i couldn't find anything related to this,

I know that we can disable each field inside the facets using the 

![@Common.FieldControl], by mentioning it individually for each field,
but this so redundant,
 
Regards,
Aakash.

Accepted Solutions (0)

Answers (1)

Answers (1)

MioYasutake
Active Contributor
0 Kudos

You can hide and display facets based on properties as example below:

UI.Facets : {
    $Type : 'UI.ReferenceFacet',
    Label : '{@i18n>@SalesData}',
    Target : 'to_ProductSalesData/@UI.Chart',
    ![@UI.Hidden] : IsActiveEntity
}

https://sapui5.hana.ondemand.com/#/topic/facfea09018d4376acaceddb7e3f03b6.html