Hi, I understood perfectly his point, the problem with that solution, and
please correct me If I'm wrong, is that I need to build the entire Map
object in order to use the lookup operation, which is annoying and contains
performance impact if I'm going to use only minimal set of that mapping.

Thanks for the clarification.
b.t.w I'm trying struts-el now, I hope that I'll find there my remedy.

Shay

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Monday, February 17, 2003 8:43 AM
To: [EMAIL PROTECTED]
Subject: Re: Struts to JSTL EL - Taglib 1.0 implementation

>>>>> "Shay" == Shay Cohen <[EMAIL PROTECTED]> writes:

    Shay> Hi,
    Shay> Tried that already, Works only if collection property returns a
Map object
    Shay> (as you mentioned), but not supported in ordinary getter with
parameter
    Shay> method.

That's exactly his point.  If you change your "object" getter method which
takes a string parameter into a "map" getter method with no parameters, then
you can use the JSTL syntax.  Since your original method has to do a lookup
with a string key, you can instead return an object (the Map) which performs
the lookup instead of doing the lookup in your getter.  This is feasible
even
if your string lookup isn't using a HashMap or HashTable.  You could even
build
an inner class that implements "Map" that performs whatever custom lookup
you
need to perform with your String key.

-- 
===================================================================
David M. Karr          ; Java/J2EE/XML/Unix/C++
[EMAIL PROTECTED]   ; SCJP; SCWCD




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


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

Reply via email to