I wonder which way is preferable: to access bean vars by the full class .property or directly access only the property name according to the manufacturerโs method? Especially if the project becomes much larger with many classes, services, facades, etc.
@Named public Service { List<Customer> getCustomers(); } use: <h:dataTable value="#{service.customers}" />
or
public Service { @Produces @Named List<Customer> getCustomers(); } use: <h:dataTable value="#{customers}" />
The first advantage for me is that if I need to change jsf, I always know exactly which class I need to change due to the fully qualified name.
This will be a drawback for the second method, but, on the contrary, it is better to read in the case of many services and classes.
What would you say to the experts?
source share