cancel
Showing results for 
Search instead for 
Did you mean: 

How to make part of the title of objectListItem to be bold and the other to be normal?

former_member195820
Participant
0 Kudos

Hi all,

I use XML view of coding. I have a list which contains ObjectListItem. I need to make part of the title of objectListItem to be bold.Here's my view and controller code:

View.xml:

<List id="Aprovalmatcvv"></List>

Controller.js:

<strong>var list2 = this.byId("Aprovalmatcvv");
var oItems = new sap.m.ObjectListItem({	    	                     
 title:"{ApproverName} - {ApproverDesignation}",
 type:"Active",
 firstStatus:[new sap.m.ObjectStatus({text:"{Status}"})],
attributes:[new sap.m.ObjectAttribute({ text:"{ApproverComments}"}),
 new sap.m.ObjectAttribute({ text:"{path: 'Approved_DateTime',   </strong><b style="font-size: 13.5px;">type: 'sap.ui.model.type.Date',formatOptions: {source: {pattern: 'yyyy-MM-ddTHH:mm:ss'},pattern: 'MMM dd,yyyy - HH:mm:ss'}}"}),</b>
<strong> ],
 });
				    	
 var oFilters = new sap.ui.model.Filter("IWiId", sap.ui.model.FilterOperator.EQ, WorkitemId);
				    	   
list2.bindItems("/LOAD_APPR_COMMENTSSet",oItems, null, oFilters);
<br></strong>

Screenshot:

I get my list like this.

Now I need to make portion of the title( title:"{ApproverName} - {ApproverDesignation}",) i.e. ApporverDesignation to be a normal text whereas the ApproverName will be bold.

Can someone help me with this?

Accepted Solutions (0)

Answers (0)