views:

275

answers:

2

With JPA I do not need to code the SQL for every new attribute as the o/r-mapping is being done automatically.

As I am new to JSF, i am wondering whether there is a similar possiblity with JSF?

I do not want to add new code to a jsf datatable every time I change something at the corresponding entity.

+2  A: 

JSF provides a way to manage events and the lifecycle of a request and its linked objects. Its always possible to use any ORM framework with it 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 JSF managed beans with a JPA framework, have a look at Seam: http://www.seamframework.org/.

Loki
+2  A: 

I do not want to add new code to a jsf datatable every time I change something at the corresponding entity.

If you want a dynamic datatable you will probably have to use an add-on to core JSF. I use IceFaces and it works very well. You can use the <ice:columns> component to generate columns dynamically. We use this to display the results of a query which may return different columns.

Phill Sacre