Web 2.0 Styles and JEE
January 10th, 2007by Jeremy Thomas
In my previous post on JEE and Web 2.0 I mentioned the use of ajax4jsf to “ajaxify” JEE web applications. I wanted to cover some additional resources we’ve used to add Web 2.0 features to JEE applications.
Rounded Corners
I’m not a graphics designer, and I struggle with tools like Gimp and MS Paint. I wanted to add rounded corners to my JEE web application and discovered roundedcrnr.com. Roundedcrnr.com automatically creates rounded corner images for you (in whatever color you like), and produces code you can incorporate into your webpage to create the rounded corner effect.
Visual Effects
The scriptaculous javascript library has some great visual effects that can be incorporated into a JEE application. There’s one trick here. By default JSF generates dynamic ids for page components, i.e. menu:_idJsp1:_idJsp39. Thus, when creating a visual effect with scriptaculous, such as “BlindDown”, the dynamic id of the component must be provided (as javascript is rendered on the client-side). To get around this, the Apache Tomahawk framework provides JSF controls with a forceId attribute. So, if a component is named menu at design time, it’ll be rendered as menu at runtime, which means you can pass menu, instead of menu:_idJsp1:_idJsp39, into your “BlindDown” javascript call.
Finally, no Web 2.0 application is complete without “spinner.gif“, which is used to show the user that “something is happening” as the mouse hourglass no longer takes effect when AJAX requests are processed. ajax4jsf has a status component that can be used to render spinner.gif when AJAX requests are executing.




Follow Me
Leave a Reply