Automatic object mapping similar to O / R mapping with JSF?
With JPA, I don't have to code the SQL for every new attribute as the o / r-mapping is done automatically.
Since I'm new to JSF, I'm wondering if there is a similar possibility with JSF?
I don't want to add new code to the jsf datatable every time I change something in the corresponding object.
source to share
JSF provides a way to manage the events and lifecycle of a request and related objects. It can always be used with any ORM structure with itself, because JSF doesn't play directly with the database (it doesn't even know about it). Hibernate + JSF is a very common combination.
But if you are asking about using managed JSF beans with a JPA framework, take a look at Seam: http://www.seamframework.org/ .
source to share
I don't want to add new code to the jsf datatable every time I change something in the corresponding object.
If you need a dynamic datatable, you probably have to use the JSF core add-on. I am using IceFaces and it works really well. You can use the component <ice:columns>
to create columns dynamically. We use this to display the results of a query that can return different columns.