Top

Blog

PrimeFaces / Blog (Page 56)

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...

SkySoftware, creator of MyEclipse for Spring Tool has put a screencast on Video demonstrating PrimeFaces-Spring code generation from database schemas. Great work! Tool is awesome, feedback I can give is to update PrimeFaces version and use p:* form components and allow an option in wizard to select the theme to use. [youtube=http://www.youtube.com/watch?v=IeZ8pjRdCdE] Also friends at SpringSource contacted me to provide an update on JSF-PrimeFaces addon for Spring ROO. Can't reveal much other than "stay tuned" a bit more....

As of PrimeFaces 2.x, oncomplete callback can be used to execute javascript when an ajax request completes like; [crayon-58dc8d4cbcbae989439059/] In case where you need to add conditional logic to your oncomplete that is done via RequestContext callback parameters, like hiding/showing dialog in case of validation errors(see demo). With 3.0.M2, there is a new handy feature coming which is executing javascript from your backing beans; [crayon-58dc8d4cbcbb2413395034/]  ...

PrimeFaces Poll component enables doing periodic requests in a specified interval, at some point you may need to stop the polling depending on a change on server side. With PrimeFaces 2.2.1 this can be implemented using RequestContext API as; [crayon-58dc8d4cbcf52432927299/] [crayon-58dc8d4cbcf55978232903/] [crayon-58dc8d4cbcf56673212484/] A bit of work right? Definitely against "make it easy" aim of PrimeFaces, so as of 3.0.M2 we can now do; [crayon-58dc8d4cbcf57824568106/] [crayon-58dc8d4cbcf58786261193/] And that's it, PrimeFaces will handle stopping the poll under the hood....

PrimeFaces DataTable Columns are now resizable, you just need to set resizableColumns to true. State is preserved on postback via cookie based persistence and we might add some ajax resize listeners if there is demand from community. Beta demos are available at Labs Showcase. This feature is actually sponsored by a client so it is paid work. It is always great to find the chance to have a sponsor to implement something for PrimeFaces and also share the...

PrimeFaces provides various component callbacks to respond certains events, for example dialog has a server side closeListener and an attribute like onCloseUpdate. Similarly datatable has rowSelectListener with onRowSelectUpdate option. That is how we are implementing the callbacks, well...