Skip to Content

SAP UI5 Object ListItem highlight

Mar 16, 2017 at 11:22 AM


avatar image
Former Member

Hi Team,

I have a Object List entry which is sorted by date in Page1 .On click of an item navigates to Page2 . On update of model when i return back to Page1 the added css highlight which was done using sId shows wrong entry highlight has the sId position of item is changed

Is there a means to identify dynamically generated sId and make css to point to it

10 |10000 characters needed characters left characters exceeded

Hi Hema,

Since the IDs are dynamic, you can't do this by accessing the control via ID in css. Instead, if you can create a custom css class, and add the class to the list item every time it is selected (and of course, remove it from the previous item), it will work in css.

Thanks and best regards,


* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Srikanth KV Mar 16, 2017 at 03:43 PM

sId's are generated at runtime based on model information. If the model is refreshed then new sId's might be generated, for this reason we should never use hardcoded sId information to access UI control

10 |10000 characters needed characters left characters exceeded