Recent Blog Posts

Posted: 2007-11-09 13:11:49
Tags: java   struts   programming   technical  
Passing Bean Message Arguments in Struts

I came across a situation with bean messages as I was working on internationalizing a Struts 1.3 application. I needed to get a value of off a properties key and pass it as an argument to another key.

Here's a sample properties file located in:
com/shahrier/akram/myapplication.properties page.name: Shahrier Akram
page.greetings: Hello {0}

Let's include this properties file into the struts configuration file, struts-config.xml, as a message resource:
<message-resources key="myapplication" parameter="com.shahrier.akram.myapplication" null="false"/>

Here's how I will pass the value of one key as an argument into another key in JSP:
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<bean:define id="myname">
  <bean:message bundle="myapplication" key="page.name"/>
</bean:define>
<bean:message bundle="myapplication" key="page.greetings" arg0="<%=myname%>"/>

The following snippet above will produce
Hello Shahrier Akram!

Handy reference for the future.

View Comments(0) » | Add Comment » | Permalink »
Posted: 2007-10-18 22:18:07
Tags: flex   flash   technology  
Adobe Flex and AIR Workshop in BTown

This should be the last of my blog posts for the days to come. There was a lot backed up I wanted to post and found the perfect opportunity as I am watching the Andy Roddick & Roger Federer US Open Quarter final match. Even better, the only & only Andre Agassi is doing some great guest commentary for the match along with J Mac.

The week before last, some amazing people from IU's Graduate wing of the Business School and the Bloomington Flex User Group with the support of Adobe, organized the Adobe Flex and AIR workshop sessions. Having a little Flex experience myself in the past few months, I was totally stoked about attending the day long workshop. Although they had beginners' and advanced track for Flex, I decided on the former to get a grip on some basics that I've been missing such as how to properly architect mxml components and event handling. It was worth every penny of it. Oh wait, this thing was as free as breathing air!!

I am just not the freeloader type but with free breakfast, lunch and the tons of free materials (see the picture?) the sponsors including Adobe handed out, you couldn't help but feel as if you landed some lottery. Really. Extremely glad for this opportunity and again, sincerest thanks to the organizers of this event and the instructors of the workshops. Certainly look forward to it next year again. By the way, AIR has great potential for mass adoption in the future. I mean, how cool is it that you write your code (HTML and javascript included) just once and then you can decide whether to deploy it on the web or the desktop? Applets? I'll pass on that, thank you very much! Guess we're all benefiting from Adobe's marketing goals with these sessions.

Definitely plan on creating little widgets for this site with Flex and/or AIR in the near future.

View Comments(0) » | Add Comment » | Permalink »
Posted: 2007-09-05 19:06:12
Tags: auto   personal   video  
Rabbit Memorabilia
Rabbit T-Shirt

I follow the rabbit owners club site from time to time and found a couple of pictures posted by fans who got this rabbit t-shirt. I thought it was a custom made t-shirt guys went out of their way to show their love for this gem of a vehicle. As it turns out, VW sends it out all the happy owners and I just got mine yesterday! It feels too precious to wear it and thinking about framing it. Vanity is going a little far eh? Guess I'll save it for a special ocassion . Rabbit 3.5 litre MKV is  due out next year, in the mean time let's salivate with this youtube video:

Cheers!

View Comments(0) » | Add Comment » | Permalink »