Re: Accessing property via "Unary Accessor"
Marc Palmer <[email protected]> Thu, 9 Mar 2006 09:37:08 +0000
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Message-ID | <[email protected]> |
On 8 Mar 2006, at 00:38, Sven Schliesing wrote: > Ok, that makes sense. Many Thanks for your quick and comprehensive > answer! > Well, what doesn't quite make sense (but I like it anyway) is that WebMacro assumes the first letter of properties should be capitalized - I think that is your real problem. i.e. in any code that uses introspection and the java bean specification, a property called "title" is accessed as "title" - this is true of languages such as Groovy also. However WM, for some reason - I imagine aesthetics - requires you to access a property like this as "Title". As far as I recall it doesn't matter whether you have a getTitle() or a public "title" field, it must always be accessed as "Title". This has always jarred slightly in terms of my 'Java programmer' expectations, but of course to non-Java end-users of WM this may not be odd at all. Cheers ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642