Aravind,
Welcome to the JavaRanch! But what does the "MJ" stand for?
You didn't do bad for a first post with formatted code, but the UBB software converted your
JSF tags to emoticons and the XML ended up stretched halfway to Kenya. The UBB software can be hard on JSF.

I've tried to make it a little more readable.
I couldn't tell which item was your foreign key, though. JSF doesn't know about databases, however, so I'd suspect you didn't have a property mapped correctly.