YUI4JSF reveals itself

YUI4JSF is a new custom component library for JavaServer Faces. We’ve started the project 2 months ago and now I’m glad to announce the initial 0.6 version is released. YUI4JSF consists of several rich components based on YUI controls like calendar, tabview, treeview, slider, datatable and etc also comes with extra features like Ajax Forms, Layout Engine. All of these features are based on YUI utilities and controls.

So why YUI?, I’ve experienced other js libs in the past and from my experience, YUI is the best out there, excellent documentation, tutorials, well written and continuously evolving. YUI also fits the JSF’s component model well so it wasn’t hard for us to handle the js rendering and handling the serverside interaction.

YUI4JSF is still in beta stage and there’re tons of work to do remaining, 0.6 is usable but not stable yet. Anyway check out the online demo;

http://www.nightdev.devisland.net/yui4jsf-examples

More links;

YUI4JSF HomePage

Ohlol Metrics

Posted in Java. 17 Comments »

MyFaces 1.2 is Released

At last MyFaces 1.2 is out. Actually it has passed the TCK some time ago but there are some prerequisites likes trinidad plugins that need to be released first. This is an important milestone for MyFaces not just because of 1.2 spec but for Apache Geronimo too since JSF goes in to the J2EE 5 Application Servers. I really enjoyed working on 1.2 myfaces, I’ve contributed by implementing the new features like field based messages (label, validatorMessage, converterMessage, requiredMessage attributes), new localized application messages and etc.

P.S. Special thanks to my friend Matthias Wessendorf aka “Release Dude” for his efforts on making the release

Posted in Java. 1 Comment »

Apache MyFaces Orchestra

JSF-Spring-Hibernate is a popular formula these days but the inconsistency between the view layer and persistence layer can be a pain in the ass. A real life example is my previous project where we’ve used OpenSessionInViewFilter of Spring which basically binds a session to a request by a filter. Then the developers in the team started to get these damn LazyInitializationException or NonUniqueObjectException errors in workflow scenarios, the reason was simple. In a request you load a persistent object and put it in somewhere like HttpSession or JSF ViewState where you can get it in further requests. The thing is; accessing an uninitialized lazy object property in another request later will cause lazy exceptions. Workarounds can be doing Session.merge() and bind the detached object to the current request but trying to maintain the synchronization of the object in each request does not sound a good idea. The real solution would be using long persistence contexts.

Apache MyFaces Orchestra is a subproject of Apache MyFaces family and tries to solve this problem with the view layer and persistence layer. It has a simple conversation api that can be used in workflow scenarios. The backing beans are not managed by JSF but spring so it can use aop tricks and custom scope functionality(JSF 2.0 will have these too hopefully).

After you read this, you’ll probably compare it with Seam, well Seam tries to solve the same problem too but also adds many more goodies to your application. If you’re using Spring I’d suggest trying Orchestra to take care of your view-persistence layer problems in workflow scenarios, on the other hand if you’ve preferred EJB3 over spring, Seam can be handy too.

Apache MyFaces Orchestra Links
Home Page
http://myfaces.apache.org/orchestra

Wiki
http://wiki.apache.org/myfaces/Orchestra

Posted in Java. 2 Comments »