on 04-16-2018 7:55 PM
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
How are you not seeing this behavior? Here is the LIST control (sap.m.list)....
https://sapui5.hana.ondemand.com/sdk/#/sample/sap.m.sample.ListSelection/preview
....and show the behavior you are describing. Which control are you using?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Christopher Solomon, i forgot the propertie mode="SingleSelectMaster" on my list so that was all the problem ! thanks! ! !
jajajja thanks , yes i figured it out 😄 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"
selectionChange="onSelectionChangeAsesor"
mode="SingleSelectMaster"
id="lAsesor"
width="100%"
items="{/}"
noDataText="Sin Datos">
<items>
<StandardListItem title="{Cod_asesor} - {Asesor_nomb}" press="onConsultarCitas" type="Active"/>
</items>
</List>
onSelectionChangeAsesor : function(oEvt) {
var item = oEvt.getParameter("listItem");
item.firePress();
}
This will fire the event onConsultarCitas of the item and at the same time keep shade the item 😄 hope this help someone else
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.