OpenXava 3.1.2: AJAX applications from JPA entities
OpenXava 3.1.2, released recently,
is a model-driven framework to develop Java Enterprise applications in an agile
way: With OpenXava you
provide only your POJOs annotated with JPA and you obtain an AJAX
application ready for production.
The main new feature of this 3.1.2 release is the support for view inheritance.
Although OpenXava generates a workable user interface from your naked
JPA entities, you have the option to refine the produced user interface
using the @View annotation. Just in this way:
@Entity
@View(name="WithSections",
members =
"name, sex;" +
"mainLanguage;" +
"experiences { experiences }"
)
public class Programmer {
Since version 3.1.2 you can defined a view extending an existing one. For example, you can reuse the WithSections view in a child class of Programmer:
@EntityAs you can see, the way to extends a view of the superclass is using the super prefix for extendsView. In this case the WithSections view of the JavaProgrammer entity will have all the members of the WithSections view of Programmer entity plus its own ones.
@View(name="WithSections", extendsView="super.WithSections",
members =
"favouriteFramework;" +
"frameworks { frameworks }"
)
public class JavaProgrammer extends Programmer {
Look the aspect of WithSections view of JavaProgrammer:
You can learn more about this new feature in the OX wiki.
Moreover, OpenXava 3.1.2 has a lot of new features and fixes, including the translation of the reference guide to Russian, and the new @OnSelectElementAction annotation for collections.
What do you think about generating the full application from JPA entities?
Do you like the @View annotation?
What do you think about th'view inheritance' new feature?
More info: http://www.openxava.org/
(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)




