Re: FormatNumberTag

2009-07-11 Thread Stuart Thiel
Hello Henri, Yes, that would solve my immediate problem. It is a bit of a one-off hack, though. The follow-through would be to take a look at all the classes and identify areas where hooks like that would be desirable. It is perhaps a difference in philosophies of programming, but my

Re: FormatNumberTag

2009-07-11 Thread Henri Yandell
Generally agreed. With public APIs I've learnt to be stronger on making things private as it tends to only come back to bite you if you try to over think it; and when it's public you have no ability to identify all the use cases so you end up in legacy hell. I just fix the bugs though - I wasn't

Re: FormatNumberTag

2009-07-11 Thread Rusty Wright
Here's a quote from the Spring docs about the open/closed principal that I think Henri is alluding to: “Open for extension...” One of the overarching design principles in Spring Web MVC (and in Spring in general) is the “Open for extension, closed for modification” principle. The reason that

Re: FormatNumberTag

2009-07-11 Thread Stuart Thiel
Hello Rusty, I don't have the mentioned book, but I quickly found the article: http://www.objectmentor.com/resources/articles/ocp.pdf I'm afraid that such is not my interpretation of that article at all. It seems to clearly suggest that an inviolate superclass, that can be subclassed (what I

Re: FormatNumberTag

2009-07-10 Thread Henri Yandell
-classing the taglibs inconvenient. For example, I would like to extend FormatNumberTag so that I can change the grouping separator. If configureFormatter in org.apache.taglibs.standard.tag.common.fmt.FormatNumberSupport were protected, instead of private, I could simply wrap it up and extend

Re: FormatNumberTag

2009-07-10 Thread Stuart Thiel
Hello Henri, Having a protected configureFormatter (and similar things for other methods elsewhere) is my preferred approach. The issue with the second approach is that doEndTag() calls createFormatter(), then configureFormatter, then formats the text. There's no facility to step in between and

FormatNumberTag

2009-07-08 Thread Stuart Thiel
Hello, A number of useful methods seem to be private. It makes sub-classing the taglibs inconvenient. For example, I would like to extend FormatNumberTag so that I can change the grouping separator. If configureFormatter in org.apache.taglibs.standard.tag.common.fmt.FormatNumberSupport were