Most notable thing about PrimeFaces 3.0.M2 is the implementation of component callbacks as ajax behaviors, read more here about the idea here.
While providing the component events as behaviors, I have decided to add more hooks to increase flexibility even more. Frameworks like JSF and the component libraries tend to do a lot for you but important design principle of PrimeFaces is transparency and keep page author in control. As an application developer, I don’t like the feeling that I’m not the one in control when using frameworks.
One example is datatable, we have built-in paging, sorting, filtering but what if you want to execute custom javascript before and after paging, what if you want to update other components on page or execute a cusom java method during pagination? Here is how it can be done;
<p:datatable paginator="true" rows="10" value="#{bean.items}" var="item">
<p:ajax event="page" listener="#{bean.onPaginate}" update="othercomponents" oncomplete="alert('done')"... />
...
Note that you don’t have to define page ajax behavior just to do regular pagination, it is only needed if you need to hook-in, otherwise default pagination will take place.
The new ajax behaviors bring great flexibility to PrimeFaces, in our forum I see that many of the limitations people are facing can easily be solved using our new approach.
Next generation of PrimeFaces is faster, smaller, more secure and much more flexible.