[ 
https://issues.apache.org/jira/browse/WICKET-4039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Igor Vaynberg resolved WICKET-4039.
-----------------------------------

    Resolution: Invalid
      Assignee: Igor Vaynberg

Component#urlFor() is a convenience method and that is why it is final. it is 
easier to say { urlFor(ILinkListener.INTERFACE); } then { 
RequestCycle.get().urlFor(this, ILinkListener.INTERFACE); } it is also more 
convenient for noobs because IDEs will autocomplete available methods, but not 
something defined in another class.

for your particular requirement see Link#setAnchor()

> Make Component#urlFor non-final
> -------------------------------
>
>                 Key: WICKET-4039
>                 URL: https://issues.apache.org/jira/browse/WICKET-4039
>             Project: Wicket
>          Issue Type: Improvement
>            Reporter: Maarten Billemont
>            Assignee: Igor Vaynberg
>
> My use case is that I want to add an anchor to the URL generated for my Page, 
> each time.  its urlFor would be an excellent place to do this, unfortunately 
> it is final.  Which, to me, makes no sense whatsoever, because there's no 
> point to its existence with it being final.  It doesn't use the instance's 
> state, it just delegates to other static methods.  So why does 
> Component#urlFor exist if it's not to give the developer an opportunity to 
> intervene and inject custom behavior?
> I hereby propose the urlFor methods become non-final.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to