I'm not expert in JSF..
There is a bean.
@ManagedBean
@ViewScoped
public class ClientBean
Also the code has class Client
(not a bean. just a class)
Actually ClientBean
duplicate all fields from Client
. What's not good. Duplication I mean itself.
It seems the reason of duplication is to provide the annotations over the fields that ClientBean
duplicates/has. Like:
@NotEmpty
@KeyFormat
private String key;
What would be the best way to reduce duplications? Let's say wrap Client
by ClientBean
.. Extends Client by ClientBean.. to be able to use annotation advantage.