> From: Jon Stevens [mailto:[EMAIL PROTECTED]]
>
> on 6/14/01 6:11 AM, "[EMAIL PROTECTED]"
> <[EMAIL PROTECTED]>
> wrote:
>
> > but it very
> > important that business logic authors don't need to work about the
> > mechanics of using one type of object over another and that
> they don't
> > have to write boilerplate code.
>
> That is why we follow a common specification...the JavaBean
> specification.
>
But we make special handling for Hashtable, for example (which are not
beans) but we want to treat the content as if they were properties.
> :-)
>
> If Jython's objects are not following that specification, then that is
> Jython's problem and Velocity should not be modified to support that.
>
I have no strong feelings about it, but you could also see this issue as a
way remove from the code all those "if" making special cases for Hashtables
(Maps) and JavaBeans.
What one needs is some sort of Velocity-Property handler that can be
registers when the context is created. By default Context will have a
Map-Property handler and a Bean-property handler preregister. But code could
prefix their own.
Velocity will just go thru them and apply the first one to match, where
matching means the object is an instanceof the class/interface specified the
handler.
Or something like that....
Jose Alberto