« Return to Thread: Can I over-ride the getProperty function?

Re: Can I over-ride the getProperty function?

by Dustin Whitney :: Rate this Message:

Reply to Author | View in Thread

Yeah, you can override a property by using "getProperty()"  http://groovy.codehaus.org/Using+invokeMethod+and+getProperty

I'd imagine the issue with "get" in the view has something to do with JSTL, but I'm not sure.  I think JSTL will just look for getBlah() whenever you do something like ${obj.blah}.

-Dustin



On Thu, May 15, 2008 at 11:25 AM, Callaway, Pamela <pcallaway@...> wrote:

Hi folks,

 

Is it possible to over-ride a property "getter" for a class? 

 

Or should I use a constructor or something to fill up a particular property, if it doesn't come directly from the database?

 

Also, I noticed I have one function that starts with get, even though I don't have a corresponding property, and it still gets created/shown as a property in the view.  Interesting – is there a reason for that?

 

Thanks,

 

Pam


 « Return to Thread: Can I over-ride the getProperty function?