From: Marc P. <ma...@an...> - 2003-04-04 00:17:27
|
Hi, Can anyone remind me exactly why WM breaks the Java Beans spec. with respect to capitalisation of properties? i.e. if you introspect a bean and get the following properties: name description ...to access these in a template you must write: $bean.Name $bean.Description This looks "nicer" to e of course, but the break from the beanspec is a pain in the ass, and is no doubt responsibly for quite a lot of messaing around in the introspection code in WM where everthing will have lower case first letters. I've written a BeanInfoWrapper that dumps into a template all the useful info about an object. This is being used in the webapp's help syste so any java object put into the context can potentially be introspected and help shown. However what you get back is not very useful unless a xxxxBeanInfo class has also been written, in which case you get plain english descriptions of the object, each property, what every method does and what the parameters are called and what they do. ...but I'm going to have to make it capitalise all the property names for it to make sense ;-( Oh, and my colleague has nearly finished the simplified XML access helper - already I have most of an RSS news feed included into a demo template without too much trouble. We have some caching fun to do though... but I will mail about that separately. Cheers -- Marc Palmer |