Skip to Content
avatar image
Former Member

SAP UI5 Object ListItem highlight

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

Add comment
10|10000 characters needed 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,


  • Get RSS Feed

1 Answer

  • Best Answer
    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

    Add comment
    10|10000 characters needed characters exceeded