I'm porting a Wicket application from 1.4 to 6.6, and there is one piece of
code I cannot find how to port.

In short, I have a Link descendant class that is supposed to navigate to a
manually constructed URL within the Web application -
something like "/context_path/view_path/view?viewId=21938423423"

In Wicket 1.4, I created an IRequestTarget instance with necessary
In Wicket 6.6, all these classes are not what they were in 1.4, and I don't
find an alternative.

The question is - how is it possible to do navigation to a plain URL within
the same application in Wicket 6?

Wicket 1.4 original code:

public class CustomViewLink extends Link<ViewConfiguration>{
    public void onClick() {
        // View links do not have a click handler.
        // Instead they are dispatched by the request handling servlet.
    protected CharSequence getURL() {
        String viewBaseURI = view.getViewBaseURI();

        RequestParameters requestParameters = new RequestParameters();
        Map<String, String> parameters = new HashMap<String, String>();
        parameters.put( IViewWebDescriptor.VIEW_ID_PARAM, Long.toString(
view.getId() ) );

        IRequestTarget target =
        if(target == null){
            throw new WicketRuntimeException("Can't find request target for
ViewConfiguration.viewBaseURI: " + viewBaseURI);
        return RequestCycle.get().urlFor(target);

Thank you in advance,


Andrew Schetinin

Reply via email to