Skip to main content
View by: Most Recent | Topic | Community | Webloggers   
Monthly Archives:    

Blogs by topic: Web Applications

• Accessibility • Ajax • Blogging • Business • Community 
• Databases • Deployment • Distributed • Eclipse • Education 
• EJB • Extreme Programming • Games • GlassFish • Grid 
• GUI • IDE • Instant Messaging • J2EE • J2ME 
• J2SE • Jakarta • JavaFX • JavaOne • Jini 
• JSP • JSR • JXTA • LDAP • Linux 
• Mobility • NetBeans • Open Source • OpenSolaris • OSGi 
• P2P • Patterns • Performance • Porting • Programming 
• Research • RMI • RSS Feeds • Search • Security 
• Servlets • Struts • Swing • Testing • Tools 
• Virtual Machine • Web Applications • Web Design • Web Development Tools • Web Services and XML 

Web Applications

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
I wrote and deployed an OpenID provider service for users. For those who are new to OpenIDs, this service allows users to log in to other sites by using the ID as the identity (for example, try Stack Overflow.) This eliminates the need to maintain separate passwords for each site, among other things. That said, the primary use case of this service is not to become just...
on Sep 21, 2009
Content available at:
on Sep 18, 2009
This blog has moved here var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E")); var pageTracker = _gat._getTracker("UA-3111670-3"); pageTracker._initData(); pageTracker._trackPageview();
on Sep 10, 2009
My previous entry dove under the covers for JSF 2.0 and examined composite component metadata. This one is far less esoteric and shows how to handle the ViewExpiredException using a new JSF feature, the ExceptionHandler, contributed by Pete Muir a JSF Expert Group representative from JBoss. JSF throws a ViewExpiredException when a postback is made to a view and, for whatever reason, that view...
on Sep 3, 2009
This blog has moved here var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "' type='text/javascript'%3E%3C/script%3E")); var pageTracker = _gat._getTracker("UA-3111670-3"); pageTracker._initData(); pageTracker._trackPageview();
on Aug 25, 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 &lt;h:form&gt;   2 &lt;f:ajax event=&quot;blur&quot; render=&quot;@form&quot;&gt;   3...
on Aug 11, 2009
In my last blog entry, I went over getting a YUI widget working on JSF2. This time, let's go over what's required to move that widget into a JSF component. No Java required, but a fair bit of JavaScript. In a lot of ways, this is just like other components that I've written about. The tricks are much the same - saving values into a JavaScript context. Including scripts into the component,...
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
Atmosphere 0.3 released with support for Scala, Clustering, Injections, Grails Support, Cometd/Bayeux Protocol, many performance improvements, and many new extension points!! The 0.3 release is our most stable/tested/improved release so far. Read what changed since 0.2: Full REST based application using Atmosphere core module Scala support: Use Scala to write powerful asynchronous web...
on Jul 23, 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
Today, I'd like to take a look at two different ways to create a poll component. Poll components are a way to periodically update a page with new information. We'll take a look at examples of these in a second, but first, a caveat: I've assumed throughout my blogs on Ajax components in JSF that you have at least a passing familiarity with JavaScript. This post assumes a bit more knowledge of...
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


Grizzly Deployer got lot of activity recently over mailing list, so I took the time to give you a new feature that been added to the release 1.9.17. The Autodeploy command. You should see that option like a default web.xml config that will be append to all your webapps that you will deploy. You can activate this feature by adding this param to the command line : java -jar grizzly-http-...
on Sep 10, 2009


I've had questions about how to inject Web Beans into servlets and whether that is supported.  In this entry I'll outline a method of accomplishing just that. This is a simple login application that communicates to a servlet using Ajax calls from a JSP view.  I'm not going to focus on the view or the protocol (Ajax) that  is used to communicate with the servlet.  If you are...
on Sep 9, 2009


TOTD #97 showed how to install GlassFish Tools Bundle for Eclipse 1.1. Basically there are two options - either install Eclipse 3.4.2 with WTP and pre-bundled/configured with GlassFish v2/v3, MySQL JDBC driver and other features. Or if you are using Eclipse 3.5, then you can install the plug-in separately and get most of the functionality. TOTD #98 showed how to create a simple Metro/JAX-WS...
on Aug 31, 2009