How do I use a dynamicaly generated "key" to pick off something in my hashmap?

The story is that I am iterating over a collection of keys into a hashmap.
In my iteration, and after doing some present/notPresent logic, I am pulling an object 
out of my HashMap, so here is a reduced example of what is happening.

Lets call my HashMap hash
and my Collection of keys, "keys" .. both of these are put into my request scope through my action
so at the end of the action, imagine a request.setAttribute("hash", hash);
request.setAttribute("keys", keys);


Ok .. now in my jsp i am iterating over my keys collection, if the key in my 
Collection passes some type of logic, then i want to pull the object associated w/ 
that key in my hashmap out and use it, so a very simple example is this:

<logic:iterate id="hashKey" name="keys">
        <%-- now "hashKey" has the string of the key into my hashmap that I do some 
testing with --%>
        <%-- do some logic, if i like what I see, I want to pull the object at location 
"hashKey" out of my HashMap --%>
        <bean:define id="hashObejct" name="hash" property="hashKey" />
        <%-- do some other with hashObject --%>
</logic:iterate>

That's all I want .. all I want is for the property attribute in my <bean:define> tag to be recognized as 
a dynamic varialble, and not look up in my "hash" HashTable for a literal key "hashKey" but 
no matter what I'm doing, no way no how can I get it to work.

I feel like I'm trying to reach over my shoulder to scratch my ass here, because I 
*know* there must be a mind-nummingly easy way to do this which I'm missing.

Any help is appreciated.

Thanks,
-steve



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to