Re: Need a clarifcation about some issues
On 4/28/07, Henning P. Schmiedehausen [EMAIL PROTECTED] wrote: Supun Kamburugamuva [EMAIL PROTECTED] writes: 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Yes, this is AFAIK a known restriction. Can you open a JIRA issue for this so that it does not get lost? No, even VelocityTools uses inner classes extensively. If the class is public and the method is public, you should be good to go. It doesn't make any difference whether the class is inner or outer. Best regards Henning -- Henning P. Schmiedehausen -- [EMAIL PROTECTED] | J2EE, Linux, |gls 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau Open Source Consulting, Development, Design| Velocity - Turbine guy |rwc |m k INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n Save the cheerleader. Save the world. - 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]
Re: Need a clarifcation about some issues
Hi, My inner class was a private one. When I made it public everything worked well. Is it a issue that private inner classes are not working? (Henning suggested to open a Jira). Thanks, Supun. On 4/29/07, Nathan Bubna [EMAIL PROTECTED] wrote: On 4/28/07, Henning P. Schmiedehausen [EMAIL PROTECTED] wrote: Supun Kamburugamuva [EMAIL PROTECTED] writes: 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Yes, this is AFAIK a known restriction. Can you open a JIRA issue for this so that it does not get lost? No, even VelocityTools uses inner classes extensively. If the class is public and the method is public, you should be good to go. It doesn't make any difference whether the class is inner or outer. Best regards Henning -- Henning P. Schmiedehausen -- [EMAIL PROTECTED] | J2EE, Linux, |gls 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau Open Source Consulting, Development, Design| Velocity - Turbine guy |rwc |m k INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n Save the cheerleader. Save the world. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need a clarifcation about some issues
On 4/29/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi, My inner class was a private one. When I made it public everything worked well. Is it a issue that private inner classes are not working? (Henning suggested to open a Jira). No. Classes and methods that are private or protected should not be accessible within a template. No need to open an issue for this. Thanks, Supun. On 4/29/07, Nathan Bubna [EMAIL PROTECTED] wrote: On 4/28/07, Henning P. Schmiedehausen [EMAIL PROTECTED] wrote: Supun Kamburugamuva [EMAIL PROTECTED] writes: 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Yes, this is AFAIK a known restriction. Can you open a JIRA issue for this so that it does not get lost? No, even VelocityTools uses inner classes extensively. If the class is public and the method is public, you should be good to go. It doesn't make any difference whether the class is inner or outer. Best regards Henning -- Henning P. Schmiedehausen -- [EMAIL PROTECTED] | J2EE, Linux, |gls 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau Open Source Consulting, Development, Design| Velocity - Turbine guy |rwc |m k INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n Save the cheerleader. Save the world. - 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] - 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]
Need a clarifcation about some issues
Hi, I have been playing with Velocity in the past few days. By doing so I encountered couple of problems. I'm not sure weather these are the documented behavior so I thought I should ask the list. 1.I couldn't set a property after I initialize the Velocity Engine (After calling the init() method). Here the particular property I was trying to set was MAX_NUMBER_LOOPS property. 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Thanks, Supun. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need a clarifcation about some issues
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Supun, Supun Kamburugamuva wrote: 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Can you verify that the inner class (and the property accessor) is public? I think introspection is blocked when a private/protected inner class is involved, so it's possible that Velocity actually can't read the values from your object. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGMjgY9CaO5/Lv0PARAh2FAJ0QCbpS3iy7FnqGrPcAOwouUQzFIwCgpqqI lJqH+n5Wc8/dFKXNTmRjKnM= =yUfv -END PGP SIGNATURE- - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Need a clarifcation about some issues
On 4/27/07, Supun Kamburugamuva [EMAIL PROTECTED] wrote: Hi, I have been playing with Velocity in the past few days. By doing so I encountered couple of problems. I'm not sure weather these are the documented behavior so I thought I should ask the list. 1.I couldn't set a property after I initialize the Velocity Engine (After calling the init() method). Here the particular property I was trying to set was MAX_NUMBER_LOOPS property. Correct. Properties must be set prior to initialization/use of the runtime. At this point, there is no support for changing properties in a runtime instance that's already in use. 2.I couldn't call inner class methods. I put an inner class object in to Velocity context and then tried to call its methods from the template. But it didn't work. Velocity just outputs the calling method name. Christopher is right here. Inner classes work just fine (i use them a lot), but they must be declared public just like any other classes you are trying access in a template. Thanks, Supun. - 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]