webtier@glassfish.java.net

Re: [webtier] Pojo extends HashMap

From: Ed Burns <edward.burns_at_oracle.com>
Date: Thu, 15 Apr 2010 11:07:00 -0700

>>>>> On Tue, 13 Apr 2010 08:24:11 -0700 (PDT), webtier_at_javadesktop.org said:

U> I would like my POJO entities to have dynamic properties. This way i
U> could easily decorate my object graph with JSF specific information.

[...]

U> The problem is if the Category pojo extends the Hasmap, the page does
U> not show anything. If i remove the extension, than it is ok.

The reason is that the MapELResolver resolves the entry first and it
looks for a map entry named "name". Rather than extend HashMap, I'd use
composition and have your Category bean have a property that *is* the
map.

Ed

-- 
| edward.burns_at_oracle.com  | office: 408 884 9519 OR x31640
| homepage:                | http://ridingthecrest.com/