At last week’s ng-conference in Paris the AngularJS team gave us an early impression of how AngularJS 2.0 is going to look like.
Now that’s a surprise: AngularFaces becomes more powerful by getting rid of it’s widgets. Quite a development for JSF widget library.
Instead of defining its own widgets AngularFaces 2.0 pimps up widgets provided by other widget libraries. In particular, it adds AngularJS to the new JSF 2.2 HTML5-style widgets. But of course it doesn’t stop there. It’s also compatible to the widgets of Mojarra and MyFaces and to many PrimeFaces widgets. Plus, it allows AngularJS to modify almost every JSF attribute.
Update Sept 16, 2014:
In the meantime I’ve released the final version of AngularFaces 2.0, so you may also be interested in the announcement of the final version.
What’s in store for you
You may already have guessed it: AngularFaces underwent a profound overhaul during the last three weeks. Now it’s much more versatile and much more “Angular”. Let’s summarize the key points of AngularFaces 2.0:
- It integrates AngularJS and JSF seamlessly. The difference between the two technologies becomes blurry. It doesn’t matter if you modify an attribute on the server side or in your AngularJS code. Both options are available to you. You can even do both, if you insist.
- In particular, JSF bean attributes are mapped into the AngularJS model. The mapping works in both directions, of course: the next request transfers changes made on the client side back to the server. After processing the user input the server update the AngularJS model again.
- Bean validation attributes (JSR 303) are evaluated on the client side by AngularJS (resembling the Client Side validation of PrimeFaces).
- Labels and error messages are added automatically to your input field (unless you tell AngularFaces otherwise).
- AngularFaces 2.0 makes internationalization much less scary. Translating your application into another language becomes very simple.
- Every AngularJS attribute is treated as a pass-through attribute. You don’t have to declare it explicitly as a pass-through attribute. For instance,
ng-hide and many more can be used in the JSF file the way you’d use it in a pure AngularJS application.