Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Get Hashmap value based on bean value.  RSS feed

 
Wes Hughes
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my jsp I have a collection of beans and a hashmap. One of the things that I need to display is the name, e.g.

Note that the beanA contains a beanB. Now what I want to is get a value out of my hashmap based on beanB.id. Theoretically, I want something like:

Which I know doesn't work. I had to resort to using bean efine to define the id as a scripting variable and then using a scriplet to display the hashmap, e.g.

I want to avoid scriptlets but can't figure out how to do this.
[ July 31, 2003: Message edited by: Wes Hughes ]
[ July 31, 2003: Message edited by: Wes Hughes ]
[ July 31, 2003: Message edited by: Wes Hughes ]
[ July 31, 2003: Message edited by: Wes Hughes ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!