From: Lane S. <la...@op...> - 2003-04-04 15:40:18
|
I think we had a discussion about this some time ago and I voiced a similar concern. You can today say $instance.value to obtain a bean value but the member will have to be public. I would imagine it would be possible to add a heuristic: search object.property --> object.getProperty(). -Lane Marc Palmer wrote: > On Thu, 03 Apr 2003 21:10:28 -0800, Lane Sharman <la...@op...> > wrote: > >> A bean implements accessors and mutators as get|set{PropertyName} >> and that WebMacro follows this pattern to resolve the public method >> with a caps on the property name. >> >> Alternatively, you can access the member as $instance.name and >> $instance.description if the instance is declared publically. >> >> Finally, you can access an object in a map as $map.marc or $map.Marc >> and it will resolve properly both if either exists so there has to be >> some flexibilty in allowing both cap types to co-exist. Right? > > > Yeah, I realise all this... but my point is that this is NOT compliant > with the bean specification. > > If you use an IDE that allows setting of properties of a bean via a > GUI you see properties as "name" not "Name". This is because the Java > introspection and bean spec mandates that the first letter of property > names is lower case - it does not just chop off the get/set. > > I just wonder if there is a specific reason for this or if it is just > on a whim i.e. "I don't like lowever case first chars". > > I'm ust whingeing because it's annoying when you need to expose info > about a bean and have to convert every property name. > -- Lane Sharman Learn About Conga, All Java GUI Builder: http://opendoors.com/conga Java Software Portal: http://opendoors.com |