Stylize newly created object that is not first of a list?

0
Hey guys, Is there a way to stylize (i.e. mark) a newly created object in a list? I was just thinking about a comment section and a UX-related question.. Let's say you have a comment section where users can reply on each other's comments. If you want to notify the user his comment is posted, without a popup (i.e. no additional click required), one way would be to stylize this new comment like "Look, here is your comment". Usually the new object is placed at the top of the list, but a reply to a comment (i.e. an object of an object) is never atop the list.  That's why I was wondering if it would be possible to assign the newly created object a class or another way to be targeted by CSS. For the record: The styling should be temporarily. If you refresh the page, the styling should be gone again, as your comment isn't new anymore.   
asked
3 answers
1

Hi Sander,

I would give the comment a status using an enumeration (or just a boolean) and use the awesome EnumClass widget to give the comments with a certain status a CSS class.

Good luck!

[Addition] You might want to have a non-persistent entity - containing the status - connected to the object, to prevent that all users will see the styling.

answered
1

Hello Sander,

You could add a non-persistable entity where you store the status of an object. With conditional visibility you show the same object, but with different classes attached. And with CSS you style the different classes.

Succes!

answered
1

Yet an other option:

If you use a listview you could for example use the css selector helper widget. This allows you to set specific styling to a container based on an attribute.

If you give the new object a attribute value different from the already existing ones you can make sure it has different styling.

answered