Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Using struts tag, retrieve value from Map & Vector

 
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Using Struts tag, we normally refer value of bean value as
<html:text property="bean.field" name="dynaform"/>
Similarly to get value from an object containing vector holds again other objects, to retrieve first objects field value, can be written as
<html:text property ="obj1.vectorName[0].fieldName" name="dynaForm"/>

Now,in case, if a hashmap contains a vector which holds bean, how can we use above tag in that case...
I tried like
<html:text property="mapName(key).[vectorIndex].fieldName" name="dynaName" />
But it doesn't seem to be working..
Any help willbe appreciated.

Thanks,
Abra
 
When you have exhausted all possibilities, remember this: you haven't - Edison. Tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic