Jim Driscoll

Subscribe to Jim Driscoll: eMailAlertsEmail Alerts
Get Jim Driscoll: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Top Stories by Jim Driscoll

The Open Ajax Alliance is a standards organization with the mission of ensuring interoperability within Web based Ajaxified applications. One of their standards relates to intercomponent communication - the ability to subscribe and publish messages which can then be picked up by code written by other authors. Please note that if you don't have an interest in Open Ajax, this post may not be especially illuminating - I've talked about the addOnEvent function before, even recently. To write an Open Ajax application, you need to subscribe to events, much like in JSF 2, by registering functions which act as listeners. For instance, suppose we had a field in our page that looked like this: And we wanted to use this textarea to write out certain events that we'd like to track. I could then have this code in a JavaScript file: 1 var statusUpdate = function statusUpdate(na... (more)

AJAX Tag Events and Listeners

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 allowed: You can use the standard browser DOM events (like click, change, keyup, etc. You can also use two special event values - action and valueChange. These two special values correspond to t... (more)

Inline Scripts with Mojarra

A few weeks ago, I blogged about ways to execute scripts on the client which you were writing out from the server via Ajax.  By popular demand, the latest build of Mojarra now allows execution of inline scripts. So, instead of having to either bundle code into an tag, or using an event to execute it later, you can now simply say something like: right inside the rendered html. You can also say something like: