incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arjuna Wijeyekoon" <arj...@gmail.com>
Subject Re: protected final methods in ADF components/renderers
Date Sat, 20 May 2006 01:55:12 GMT
Some of those methods (and classes) were marked final to discourage people
from using them.
The reason is that even though these methods and classes were in the
"internal" package, people would still use them and then complain when the
apis changed and were nolonger backwards-compatible.

On 5/14/06, Adam Winer <awiner@gmail.com> wrote:
>
> Without having looked at this specific example, they're probably
> overriding protected methods from the parent class (abstract
> protected, perhaps?).  In which case, they need to be protected,
> but if they aren't intended for overriding, they're marked final.
>
> -- Adam
>
>
> On 5/14/06, Rogers Reilly <rogers_reilly@s-rod.com> wrote:
> > Hi,
> >
> > I'm looking into extending <af:table>, and had a question about the use
> > of "final" on several protected methods- notably the
> > "renderRegularHeaders" method in DesktopTableRenderer.  All I need to do
> > is stick javascript onmouseover/onmouseout events (a feature the
> > Tomahawk table has in the form of "rowOnMouseover/rowOnMouseout") on the
> > TR element, which gets written there, but because the method is marked
> > "final," I'm stuck overriding a method way higher up the stack (haven't
> > figured out exactly how high yet) and copying a bunch of code verbatim.
> >
> > I ran into a similar issue adding the defaultSortOrder feature I
> > submitted a JIRA issue about earlier; some "final" method of
> > ColumnGroupRenderer necessitated my extending XhtmlRenderer directly
> > with lots of copied code, rather than extending ColumnGroupRenderer and
> > overriding a method or two.  (by the way, will provide working
> > defaultSortOrder code when I get a sec)
> >
> > My question--and this is an honest question, I'm a relatively new and
> > self-taught Java developer--is what does marking these methods "final"
> > buy you?  If they're marked "protected," it seems like they're designed
> > to be overriden.  A lot of the features I'd like to add--little
> > Javascript here and there, maybe inline CSS on child table elements,
> > etc--is piddly stuff that would be great to be able to implement with
> > polymorphism.
> >
> > Thanks in advance,
> > Rogers
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message