The second way, %{test['AnyString'].att} or even, explicitly, %{test['AnyString'].getAtt()} should both work.
I know it might sound dumb, but is there a value to att? ( using that class as an example, there's no way to set it :-) -a Felipe Rodrigues wrote: > > Hi guys, > > I have this case now, and I'm not getting take the value of a map value > attribute. > Let me explain better. I have a class: > > class Mov{ private String att; public String getAtt(){ return att; } > } > > and I put it inside a java.util.Map, like > > Map test = new HashMap(); > test.put("AnyString", new Mov( ) ); > > So I'm trying to get the value of att from the map, using OGNL. > %{test['AnyString']} prints the mov.toString( ), > %{test['AnyString'].att} prints nothing and finally > %{test['AnyString']}.att prints it as literal. > > Using EL I would do that, ${test['AnyString'].att}, how could I do the > same thing using OGNL? > > Thanks in advance, > > Felipe > -- View this message in context: http://www.nabble.com/How-to-get-a-attribute-value-of-map-value--tf3532725.html#a9860232 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]