• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

Using struts tag, retrieve value from Map & Vector

Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.

Hang a left on main. Then read this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
    Bookmark Topic Watch Topic
  • New Topic