How to use Non-persistable entity for UI Logic?

I pass an object to the page as a page parameter(e.g. Product entity). I use different bool variables to manage conditional visibility on the page. Instead of keeping them inside the Product entity, I want to move them to a separate Non-persistable entity (e.g ScreenLogic). What is the best approach to implement it? Currently I have 2 problems: I can’t nest Products data view inside ScreenLogic data view, because Product is a page parameter. I can’t do otherwise and put ScreenLogic inside the Product because in this case, all dynamic data inside the Product data view will lose connection to the data source. There is a string attribute in the ScreenLogic entity, and I need to change it when I do something with the Product. But how can I change a Non-persistable entity attribute, if I can’t retrieve this entity in a microflow?
1 answers

Try linking your Helper (NPE) and Product

Pass NPE to the page, so you can use the booleans  and associated Product entity.

Or you can also use NPE as page parameter and use a DSS on data view to retrieve the required product and show it.

Have done both the approaches a lot in my project.

When you pass NPE as page parameter, your second problem will be solved.

Hope this answers, otherwise, I might not have fully understood your problem.