Mh... template method pattern, very beautiful. I'm messing around with JSF frameworks
and example codes for a while now, and I often wondered why no one did it like this
before.
I'd like to add something. I believe you can implement the setObject()-method in the
abstract class PersistenceBean, too, since it should be the same in alle inheriting
classes.
BUT: What about casting? I mean when you access the employee, e.g.
<h:outputText value="#{employee.name}" />
then JSF accesses the getName() method of the employee object. But since this one is a
java.lang.Object and not a Employee I fear that we might get a MethodNotFoundError. Or is
the reflection mechanism in Java smart enough for this?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3956905#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...