From: Paul G. W. <pa...@we...> - 2002-11-15 15:29:14
|
Please correct me if I'm wrong, but I was under the impression that the Bean specification held that a property named "foo" would have accessor methods: public Type getFoo() public void setFoo(Type t) i.e. the letter case of the first letter of the property name reverses itself when defining the name of the property. This is the pattern in all of the example code provided by Sun, as well as the Bean Serializer in the Apache SOAP package. Yet, webmacro (at least 1.0.1, I haven't tried 1.1b1) seems to have it the other way. In other words if I have a variable $var of my bean type, webmacro will not expand $var.foo when I have the methods indicated above, but it will expand $var.Foo. This seems like a bug to me, although difficult to fix in light of the existing templates that must be out there. Perhaps webmacro ought to try both variants, i.e. if it see $var.pname it should look for getPname() as well as getpname() ( and I would argue that it should be in that order). Comments? -Paul Weiss |