Hello there,
I have following design issue with
JSF rich faces.
I have a rich table which will display rows of a table through a Entity class.
-->Now I need to add a checkbox column to it <--
So is it a good programming practise to place a field in my entity class, like following ?
@Entity
class Person
{
...
...
...
@transient
boolean selected = false;
}
Are we overloading Entity? what about the scenarios where in we do not require those additional transient fields?
Can I have wrapper around Person entity saying
class PersonWithUIState extends Person
{
private boolean selected = false;
private boolean editable = false;
private boolean deletable = false;
etc...
}
Please suggest.
}