Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #13102
| From | Chris Riesbeck <Chris.Riesbeck@gmail.com> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: JSTL: getting a map's keys |
| Date | 2012-03-21 13:09 -0500 |
| Message-ID | <9sujq2Foc1U1@mid.individual.net> (permalink) |
| References | <9spbepF1baU1@mid.individual.net> <xLP9r.4373$dq4.2106@newsfe23.iad> <9srshfFjo5U1@mid.individual.net> <9sruffF39oU1@mid.individual.net> <14359232.4616.1332266714833.JavaMail.geo-discussion-forums@pbcr5> |
On 3/20/2012 1:05 PM, Lew wrote:
> Chris Riesbeck wrote:
>> http://docs.oracle.com/javaee/5/api/javax/servlet/jsp/JspApplicationContext.html
>>
>> So the Map interpretation will always override the Bean interpretation.
>
> Now that your main question is answered, a couple of comments are in order.
>
> - Don't have scriptlet in your JSPs.
I never do. That was in the original JSP just to show that getKeys() was
functioning and returning a non-empty result
> - If you had *composed* a 'Map' into a custom class rather than
> inheriting 'Map', you would not have had the problem. Your custom
> class would have been resolved by the bean resolver. - This in turn
> would make for a better design overall. Instead of your view artifact
> (the JSP) caring about the implementation details of the map and its
> set of keys, you'd have a controller call like 'getKeys()' or
> whatever that would cleanly separate the logic of how you get them
> from presentation concerns.
Using delegation (my preference also) doesn't support the JSP EL form
${rates["Bill"]}. If I had a custom class, I'd need a custom tag or
custom EL resolver to make that work.
The original goal was to get the JSTL away from knowing about Map's, in
particular about entry.key and entry.value.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-19 13:15 -0500
Re: JSTL: getting a map's keys Lew <lewbloch@gmail.com> - 2012-03-19 12:57 -0700
Re: JSTL: getting a map's keys Tim Slattery <Slattery_T@bls.gov> - 2012-03-19 16:08 -0400
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-19 16:06 -0500
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-19 16:39 -0500
Re: JSTL: getting a map's keys markspace <-@.> - 2012-03-19 15:27 -0700
Re: JSTL: getting a map's keys Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-19 16:59 -0700
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-20 12:19 -0500
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-20 12:52 -0500
Re: JSTL: getting a map's keys Lew <lewbloch@gmail.com> - 2012-03-20 11:05 -0700
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-21 13:09 -0500
Re: JSTL: getting a map's keys Lew <noone@lewscanon.com> - 2012-03-22 07:51 -0700
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-22 12:53 -0500
Re: JSTL: getting a map's keys Lew <lewbloch@gmail.com> - 2012-03-22 13:23 -0700
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-23 12:23 -0500
Re: JSTL: getting a map's keys Lew <noone@lewscanon.com> - 2012-03-23 13:50 -0700
Re: JSTL: getting a map's keys Chris Riesbeck <Chris.Riesbeck@gmail.com> - 2012-03-26 14:10 -0500
Re: JSTL: getting a map's keys Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-20 11:28 -0700
Re: JSTL: getting a map's keys markspace <-@.> - 2012-03-20 11:29 -0700
Re: JSTL: getting a map's keys Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-03-20 12:10 -0700
csiph-web