Skip to Content
0
Jan 19, 2023 at 05:05 AM

How to make UI annotation UI.Identification to Bold?

383 Views Last edit Jan 20, 2023 at 05:33 AM 5 rev

Hi Experts,

I have a requirement to make a field to bold which was added via UI annotations using UI.Identification as shown below:

*********************************************

extend view C_PurchaseOrderFs with ZMM_PURORD_EXT{<br> @semantics.amount.currecycode: 'DocumentCurrency'<br> @DefaultAggregation: #NONE<br> @UI.datapoint:{ <br> title: 'Total' }<br> @UI.identification: [{ <br> position:40, <br> label: 'Total',<br> importance: #HIGH<br> }]<br> PurchaseOrderNetAmount as Total<br>}

********************************************

To make Total Value to Bold I have extended Controller and onAfterRendering() hook method I tried to apply Style Class which was defined in CSS as mentioned below:

<html:style><br> .myTotalValBoldtxt {<br> font-weight: bold !important;<br> }<br></html:style><br><u>In My Controller Extension: <br></u>onAfterRendering : function(){<br> var oText = sap.ui.getCore().byId("_field16-text");<br>oText.addStyleClass("myTotalValBoldtxt");<br>}<br>// "_field16-text" is auto generated ID and not a stable ID.

However Total Value field doesn't have a stable ID as specified in this link : https://sapui5.hana.ondemand.com/sdk/#/topic/f51dbb78e7d5448e838cdc04bdf65403.html

can we assign stable IDs from UI Annotations side?

Could you please help how to make this Total Value in above UI annotations to Bold?

Thanks so much in advance.

Kind Regards

Sita Mahalakshmi

my-inbox-screenshot.png

Attachments