You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Gerolf Seitz <ge...@gmail.com> on 2007/07/06 21:37:36 UTC

SmartLinkLabel - why final?

since juergen donnerstag is the author of this class, this question is
probably directed towards him, but all opinions are welcome, as always.

i wanted to provide an encrypted version of the SmartLinkLabel but since
it's marked as final i would have to copy/paste the existing code and modify
it accordingly.
what's a bit strange too is the static method smartLink, which does the
actual text processing.

is it possible to remove the final and allow the smartLink method to be
overwritten?
for better reuse of the actual text processing (currently also used in
MultiLineSmartLinkLabel), maybe some kind of factory/strategy/whatever could
help...

it would probably be better too, if the default implementation renders an
encrypted link (using html entities like &#65;..).

gerolf

Re: SmartLinkLabel - why final?

Posted by Gerolf Seitz <ge...@gmail.com>.
wow, that was quick, juergen. thx

well, since it's still fresh, it could still be improved a little bit, as of
right now, ILinkRenderStrategy can't make use of regex groups, as only a
single string is passed to the ILinkRenderStrategy#buildLink method.
this problem could be solved by passing a String[] to the buildLink method.
this String[] is built by LinkParser and just represents the groups from the
regex-matcher.
it just looks a little bit too much implementation specific, as there is no
reference to regex patterns in the interfaces, as it's an implementation
detail of the class LinkParser.

what do you think?

gerolf

On 7/8/07, Gerolf Seitz <gerolf.seitz@gmail.com > wrote:
>
> just filed a jira issue with a patch.
> see https://issues.apache.org/jira/browse/WICKET-731
> i'd be happy for any comments...
>
> On 7/7/07, Gerolf Seitz <ge...@gmail.com> wrote:
> >
> > will do, i'm just too tired now to finish what i have already started.
> > i will get back to you as soon as i have finished it.
> >
> > gerolf
> >
> > On 7/6/07, Juergen Donnerstag <ju...@gmail.com> wrote:
> > >
> > > any patch is welcome. Please open a jira issue, upload the patch and
> > > I'm happy to look at it. Thanks.
> > >
> > > Juergen
> > >
> > > On 7/6/07, Gerolf Seitz < gerolf.seitz@gmail.com > wrote:
> > > > since juergen donnerstag is the author of this class, this question
> > > is
> > > > probably directed towards him, but all opinions are welcome, as
> > > always.
> > > >
> > > > i wanted to provide an encrypted version of the SmartLinkLabel but
> > > since
> > > > it's marked as final i would have to copy/paste the existing code
> > > and modify
> > > > it accordingly.
> > > > what's a bit strange too is the static method smartLink, which does
> > > the
> > > > actual text processing.
> > > >
> > > > is it possible to remove the final and allow the smartLink method to
> > > be
> > > > overwritten?
> > > > for better reuse of the actual text processing (currently also used
> > > in
> > > > MultiLineSmartLinkLabel), maybe some kind of
> > > factory/strategy/whatever could
> > > > help...
> > > >
> > > > it would probably be better too, if the default implementation
> > > renders an
> > > > encrypted link (using html entities like &#65;..).
> > > >
> > > > gerolf
> > > >
> > >
> >
> >
>

Re: SmartLinkLabel - why final?

Posted by Gerolf Seitz <ge...@gmail.com>.
just filed a jira issue with a patch.
see https://issues.apache.org/jira/browse/WICKET-731
i'd be happy for any comments...

On 7/7/07, Gerolf Seitz <ge...@gmail.com> wrote:
>
> will do, i'm just too tired now to finish what i have already started.
> i will get back to you as soon as i have finished it.
>
> gerolf
>
> On 7/6/07, Juergen Donnerstag <ju...@gmail.com> wrote:
> >
> > any patch is welcome. Please open a jira issue, upload the patch and
> > I'm happy to look at it. Thanks.
> >
> > Juergen
> >
> > On 7/6/07, Gerolf Seitz <gerolf.seitz@gmail.com > wrote:
> > > since juergen donnerstag is the author of this class, this question is
> > > probably directed towards him, but all opinions are welcome, as
> > always.
> > >
> > > i wanted to provide an encrypted version of the SmartLinkLabel but
> > since
> > > it's marked as final i would have to copy/paste the existing code and
> > modify
> > > it accordingly.
> > > what's a bit strange too is the static method smartLink, which does
> > the
> > > actual text processing.
> > >
> > > is it possible to remove the final and allow the smartLink method to
> > be
> > > overwritten?
> > > for better reuse of the actual text processing (currently also used in
> > > MultiLineSmartLinkLabel), maybe some kind of factory/strategy/whatever
> > could
> > > help...
> > >
> > > it would probably be better too, if the default implementation renders
> > an
> > > encrypted link (using html entities like &#65;..).
> > >
> > > gerolf
> > >
> >
>
>

Re: SmartLinkLabel - why final?

Posted by Gerolf Seitz <ge...@gmail.com>.
will do, i'm just too tired now to finish what i have already started.
i will get back to you as soon as i have finished it.

gerolf

On 7/6/07, Juergen Donnerstag <ju...@gmail.com> wrote:
>
> any patch is welcome. Please open a jira issue, upload the patch and
> I'm happy to look at it. Thanks.
>
> Juergen
>
> On 7/6/07, Gerolf Seitz <ge...@gmail.com> wrote:
> > since juergen donnerstag is the author of this class, this question is
> > probably directed towards him, but all opinions are welcome, as always.
> >
> > i wanted to provide an encrypted version of the SmartLinkLabel but since
> > it's marked as final i would have to copy/paste the existing code and
> modify
> > it accordingly.
> > what's a bit strange too is the static method smartLink, which does the
> > actual text processing.
> >
> > is it possible to remove the final and allow the smartLink method to be
> > overwritten?
> > for better reuse of the actual text processing (currently also used in
> > MultiLineSmartLinkLabel), maybe some kind of factory/strategy/whatever
> could
> > help...
> >
> > it would probably be better too, if the default implementation renders
> an
> > encrypted link (using html entities like &#65;..).
> >
> > gerolf
> >
>

Re: SmartLinkLabel - why final?

Posted by Juergen Donnerstag <ju...@gmail.com>.
any patch is welcome. Please open a jira issue, upload the patch and
I'm happy to look at it. Thanks.

Juergen

On 7/6/07, Gerolf Seitz <ge...@gmail.com> wrote:
> since juergen donnerstag is the author of this class, this question is
> probably directed towards him, but all opinions are welcome, as always.
>
> i wanted to provide an encrypted version of the SmartLinkLabel but since
> it's marked as final i would have to copy/paste the existing code and modify
> it accordingly.
> what's a bit strange too is the static method smartLink, which does the
> actual text processing.
>
> is it possible to remove the final and allow the smartLink method to be
> overwritten?
> for better reuse of the actual text processing (currently also used in
> MultiLineSmartLinkLabel), maybe some kind of factory/strategy/whatever could
> help...
>
> it would probably be better too, if the default implementation renders an
> encrypted link (using html entities like &#65;..).
>
> gerolf
>