http://stackoverflow.com/questions/8602489/delete-version-number-in-url
describes a solution (see code below) to remove the version number in urls
like: http://localhost/MyPage/SubPage?0

But this solution doesn't work anymore since Wicket 6.13+.

Is there a way to get this working in 6.15?


Solution for < 6.13:
===== In Application.init(): ======
mount(new MountedMapperWithoutPageComponentInfo("/subpage", MyPage.class));

====== In MountedMapperWithoutPageComponentInfo  =============

public class MountedMapperWithoutPageComponentInfo extends MountedMapper {

  public MountedMapperWithoutPageComponentInfo(String mountPath, Class<?
extends IRequestablePage> pageClass) {
    super(mountPath, pageClass, new PageParametersEncoder());
  }

  @Override
  protected void encodePageComponentInfo(Url url, PageComponentInfo info) {
    // do nothing so that component info does not get rendered in url
  }

  @Override 
  public Url mapHandler(IRequestHandler requestHandler) 
  { 
      if (requestHandler instanceof ListenerInterfaceRequestHandler ||
                requestHandler instanceof
BookmarkableListenerInterfaceRequestHandler) { 
          return null; 
      } else { 
           return super.mapHandler(requestHandler); 
      } 
  } 
}

======================

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Delete-version-number-in-url-tp4665752.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to