|
Loading...
|
velocity-user@jakarta.apache.org
[Prev] Thread [Next] | [Prev] Date [Next]
RE: Bean Introspection Gyanesh M Khanolkar Sat Sep 09 09:05:37 2006
Im using PublicFieldUberspect developed by Shinobu Kawai -----Original Message----- From: Nathan Bubna [mailto:[EMAIL PROTECTED] Sent: Saturday, August 26, 2006 3:19 AM To: Velocity Users List Subject: Re: Bean Introspection Are you using the methodizer or the uberspect? What happens when you do $UserObj.StringArr1 without the #foreach loop? On 8/25/06, Gyanesh M Khanolkar <[EMAIL PROTECTED]> wrote: > Thanks Nathan for your links. > > I did a quick test and basic types and Collections seem to work. But > something like this does not seem to work: > > public User[] StringArr1 = new User[2]; > > #foreach ($usr in $UserObj.StringArr1) > $usr.FName > #end > > I get the output : $usr.FName and not the value in it. > > Did the default array type work for you guys? > > Thanks again for your quick response. > Gyanesh > > -----Original Message----- > From: Nathan Bubna [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 26, 2006 2:43 AM > To: Velocity Users List > Subject: Re: Bean Introspection > > Currently there are two ways you can do this: > > http://jakarta.apache.org/velocity/docs/api/org/apache/velocity/app/FieldMet > hodizer.html > > http://wiki.apache.org/jakarta-velocity/PublicFieldUberspect > > On 8/25/06, Gyanesh M Khanolkar <[EMAIL PROTECTED]> wrote: > > Hi, > > > > > > > > I have read in many forums for requests to read public fields ALSO incase > > the getters are missing. But it seems we are still going by the JavaBean > > specification which allows us to access the property ONLY via a getter > > variable. > > > > > > > > Preferably we would want to avoid the painful getters as it bloats up our > > already existing code. > > > > > > > > Would it be possible for you to reconsider this approach where > > $UserObj.FirstName will check with the getters : getFirstName() / > > getfirstName() and if both were not found, then it accesses the public > > variable FirstName. > > > > > > > > Introduction of this feature would be of great help as it helps us to > reduce > > writing additional code which is often of no use. > > > > > > > > Regards > > > > Gyanesh > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. > Version: 7.1.405 / Virus Database: 268.11.6/427 - Release Date: 8/24/2006 > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.405 / Virus Database: 268.11.6/427 - Release Date: 8/24/2006 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
- Bean Introspection Gyanesh M Khanolkar 2006/09/09
- Re: Bean Introspection Nathan Bubna 2006/09/09
- RE: Bean Introspection Gyanesh M Khanolkar 2006/09/09
- Re: Bean Introspection Nathan Bubna 2006/09/09
- RE: Bean Introspection Gyanesh M Khanolkar 2006/09/09 <=
- Re: Bean Introspection Nathan Bubna 2006/09/09
- RE: Bean Introspection Gyanesh M Khanolkar 2006/09/09
- RE: Bean Introspection Gyanesh M Khanolkar 2006/09/09
Re: Bean Introspection Barbara Baughman 2006/09/09
- Re: Bean Introspection Nathan Bubna 2006/09/09
- RE: Bean Introspection Gyanesh M Khanolkar 2006/09/09
- Re: Bean Introspection Barbara Baughman 2006/09/09
- Re: Bean Introspection Nathan Bubna 2006/09/09