struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Aborg <daniel.ab...@netengines.com>
Subject Using a Map like a bean?
Date Fri, 09 Nov 2001 13:46:13 GMT
Hello!

I'm working on a project which we're developing using struts 1.0, and 
have just ran into a problem. Our business logic is using both Maps and 
beans to represent the data, and I can't find a way to access Map 
properties in struts.

I've been looking at the documentation, googled around a bit and scanned 
the mail archives of struts-user. I came up with two things: 1) There 
might have been an implementation later than 1.0 of string indexed bean 
properties, though this isn't what I want. 2) The functionality I want 
seems to be wanted by other people as well but isn't implemented.

What I'm looking for is some intuitive way to mix beans and Maps, 
something like this:

<bean:write name="map" property="{key}"/>

Which gets "key" from the Map stored in the attribute "map".

And, to take it further, something like this:

<bean:write name="bean" property="map{key}"/>

<bean:write name="bean" property="map{key}.bean2.bean3.map2{key2}"/>

Etc. This seems pretty intuitive to me.

Is there any implementation of something like this in later versions of 
struts? Any stand-alone taglibs which implement it? Anything which might 
be of help in finding an implementation which deals with this? I'd 
rather avoid having to write the tags myself, as I'm under time 
constraints, oh joy.

Thanks for your help!

/Daniel

-- 
Daniel Aborg - Developer  <daniel.aborg@netengines.com>
M: +44 (0)7720 29 44 40  DDI: +44 (0)20 7451 1447
Netengines: +44 (0)20 7451 1444  <www.netengines.com>


--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message