Skip to Content

How to shade a items selected from a list

Apr 16 at 06:55 PM


avatar image

Hello community, i have a list and so i want to when i press one item this item change the background or change the color so i could identify what item did i press previously and if i press another this change color and the item before gets normal and so on, i'm reading some events from the documentation but i can't find something i know tables have this behave like "standard" but not the list . I tried sending an icon but dit not know how to remove that icon when i press another item

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Christopher Solomon
Apr 16 at 07:07 PM

How are you not seeing this behavior? Here is the LIST control (sap.m.list)....

....and show the behavior you are describing. Which control are you using?

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Christopher Solomon, i forgot the propertie mode="SingleSelectMaster" on my list so that was all the problem ! thanks! ! !


the only problem now i'm facing it's when i press an item this does not fired my event


You will figure it out...I have faith in you! =)

Christopher Solomon

jajajja thanks , yes i figured it out :D to fire the event of a standarlistitem in a list you must add the propertie selectionChange="onEvent" and this event will trigged the item-event something like this

<List 	headerText="Asesor" 
	noDataText="Sin Datos">
	   <StandardListItem title="{Cod_asesor} - {Asesor_nomb}" press="onConsultarCitas" type="Active"/>
onSelectionChangeAsesor : function(oEvt) {
			var item = oEvt.getParameter("listItem");
This will fire the event onConsultarCitas of the item and at the same time keep shade the item :D hope this help someone else