Just a short post to note that we've now shipped Mojarra 2.0.1. This version fixes a very serious bug when running on Tomcat. You can pick up the files from the usual places, see the release notes for more information.
If you're using GlassFish, and already running 2.0.0 (you leading edge adopter!), there's probably no reason to upgrade - though the new v3 (b69) has the updated jar, and it will...
on Oct 23, 2009
After years of effort, I'm delighted to echo Ryan Lubke's announcement that Mojarra 2.0 is final!
Please check Ryan's blog for all the details. You can download it directly from the project website, or just use maven to get the latest stuff.,.
on Oct 19, 2009
Enabling this is as simple as putting the below into your web.xml:
on Sep 28, 2009
Today we're going to talk about two features of JSF 2.0's f:ajax tag: the event attribute and the listener attribute.
The use of both of these is really, really simple - so I'll just briefly cover the basics, and then launch directly into the sample code.
The "event" attribute of the ajax tag indicates which event to use to trigger the ajax request. There are any number of possible events...
on Sep 26, 2009
A nice feature of Facelets is the ui:repeat tag, which iterates over a supplied list of values to do a full list on your page. One problem: it'll add an index to the generated id's, which can make using it with Ajax a bit of a drag. But if you're just using the f:ajax tag, that index is detected automatically, making ajaxifying the tag relatively easy. Here's a quick example:
Say you want to...
on Aug 17, 2009
A recent user question, which has been repeated enough times to warrant a blog posting. In short: Why am I losing focus when I use the <f:ajax> tag?
Let's imagine you have a form, with two input fields and two output fields:
<pre> 1 <h:form> 2 <f:ajax event="blur" render="@form"> 3...
on Aug 11, 2009
on Aug 9, 2009
If you're not developing JSF with third party component libraries, you're really missing out on the best part of JSF. But there's lots of Ajax widgets out there, which contain all kinds of useful functionality. Wouldn't it be useful to use those within your JSF pages?
The Yahoo UI library is pretty nifty stuff, and the Calendar widget is useful, pretty, and powerful. Let's wire it into a JSF...
on Aug 2, 2009
About a year ago, I gave a talk at JavaOne (and blogged about) writing a Comet powered TicTacToe (naughts and crosses to you Anglophones) game using the Grizzly Comet APIs.
In preparation for writing a Comet app with JSF 2, I thought I'd revisit that application and update it to use the newest Atmosphere APIs.
Atmosphere is a multiplatform Comet framework that allows you to write once, run...
on Aug 1, 2009
Since I mentioned the other two parts of his article, it's worth pointing out the third. Go check it out, lots of great information on JSF2.
on Jul 29, 2009
I'd wanted to blog some time ago about including scripts in your JSF ajax requests, but Hazem Saleh beat me to it. Hazem is the creator of the nifty Google Maps component for JSF, gmaps4jsf.
So, go and follow the link, but I'll just add three short comments to Hazem's blog:
In many popular ajax solutions for JSF, <script> tags were simply interpreted in place. This is not, for whatever...
on Jul 18, 2009
The Mojarra team are proud to announce the release of our Beta 2 version of Mojarra 2.0, implementing the PFD version of the JavaServer Faces 2.0 spec.
You can find it on our downloads page, as well as in the GlassFish Update Center. And as always, be sure to check the release notes for more information.
We're targeting the FCS release of JSF 2 to coincide with Java EE 6, so expect that to...
on Jul 16, 2009
on Jul 3, 2009
Just a quick note that we've now added automatic compression of the jsf.js file served by JSF 2. The file size of jsf.js, 71k uncompressed, comes to about 16k compressed (there are a lot of comments in there).
There is no user action required to make this happen: If the Project stage is Development, the file is served uncompressed (for ease in debugging with something like Firebug), but if...
on Jul 3, 2009
Not too long ago, I heard someone complain that the JSF tutorial wasn't ready yet. Now, that's not surprising - the tutorial writing process (for that matter, the book writing process) doesn't actually start until the spec is more or less final, and the implementation is at least Beta (meaning feature complete).
But that raises the question: Suppose you're eager to get started. How do you...
on Jun 17, 2009
David Geary has released the second of his three part series on JSF 2. You can find it here.
He covers templating and composite components, and as usual, does a very readable and thorough job - check it out.
on Jun 2, 2009
Continuing our look at the improvements of the new JSF spec - see previous blogs here and here.
While JSPs are widely used and understood, their use in JSF has always been controversial. But love it or hate it, it's always been true that JSPs never quite fit in with JSF, and there were always some rough edges around where the two technologies fit together. All that's changed with JSF 2, since...
on May 29, 2009
Continuing our look at JSF (see previous blog here), one of the biggest complaints about JSF is the Lifecycle. And it's not hard to understand why - here you are, just about to write a Hello World application, and the folks who wrote the documentation hit you with something that looks like this:
Wow. Looks complicated. But really, for many tasks, you don't need to know most of this, and that'...
on May 28, 2009
One of the most persistent annoyances in working on JSF is the pervasiveness of old information, usually from years ago, and often now inaccurate. Google ranks the JSF 1.1 tutorial over the JSF 1.2 tutorial... One Tweet I recently read referred to a Joe Ottinger blog from 2007 - over 2 years ago. Yet it was referenced as new information. Still another blog I recently read contained...
on May 27, 2009
It's been a long time, but I've revisited the Switchlist component I blogged about here here and here. Read through those old entries to see where we are with things. I will assume you're already familiar with the content of those entries, we've got a lot to cover as it is.
Today, we're going to completely rework this code, to illustrate some best practices. We'll make the component use Ajax...
on May 26, 2009