It's JavaOne time, and you know what that means - time to ship software! The Mojarra team are proud to announce the first Beta of Mojarra 2.0, supporting the PFD JavaServer Faces 2.0 spec.
Recently, I had a user ask how to do a redirect from an JSF 2.0 Ajax request. Here's one way.
Just wanted to let everyone know that there's a new article by the esteemed David Geary on JSF 2.
Just wanted everyone to know about it - it's the first of the series, and it's really, really good.
After my last blog post on composite components, Ed Burns, the spec lead, pointed out a better way to do things, by using a controller for the component. Here's a short explanation of what to do to make that work.
With the release of the JSF 2.0 PR, along with the corresponding release in Mojarra, it's time to quickly review my recent posts.
It's been awhile, but I want to come back to the switchlist example that were the focus of my last two technical posts. This time, we'll take the basic switchlist, and put it into a composite component. The interesting bit will be how we get those two buttons working...
Now that we've defined the basic behaviors of the switchlist component, it's time to wire it up with ajax. This time, we'll do it a new way - with the f:ajax tag.
You've seen this component before: two lists, with buttons that let you move options from one list to the other. We'll use this example for our next few blog posts looking at JSF 2.0 features.
I was sitting in at a talk on Ajax components the other day, and they mentioned the Flickr style editable text. I thought - I wonder how hard that would be as a component in JSF 2.0? The answer: Not too bad, about 100 lines of code. Here it is.
We'll take another look at my example Spinner component, and this time, we'll modify it so that you can put multiple components on a page. There's a few tricks you need to know, but once you get past those, it's pretty easy.
In my last blog, I wrote a simple spinner component. In this posting, I'll add styling to it using the outputStylesheet tag, and a separate css file.
Here's a slightly more complex example of writing a component using JSF 2.0's Composite Component feature. The Spinner component takes only 30 lines to create the classic "entry field with buttons" spinner as a component you can use in any JSF page.
Another new feature of JSF 2.0 is integrated Ajax support. Here's one fairly simple example of that feature in action.
One of the pain points for JSF has always been the complexity that you face in creating components. In JSF 2.0, creating a new component that's made up of existing components is a snap. Here's how.
In my previous blog, I wondered what the best way to solve the problem on the client of the server connection timing out. The answer is so obvious that I'm a little embarressed I missed it - it's the onload event for iframe. This solution works for both long polling and HTTP Streaming connections that use a hidden iframe.
Using Grizzly's Comet APIs (now available in Glassfish v3), I create a dead simple Comet example, with about 100 lines in two files.
I'm currently learning JSF, and wanted to give a little Google link love to a really great guide to learning JSF's use with databases, especially the Datatable component..
The JSF Datatables Howto (at http://balusc.blogspot.com/2006/06/using-datatables.html) written by BalusC is a great getting started guide to using databases with JSF, and if this is something you're looking for, check it out...