Version Wicket 7.3
By default, when onSubmit () is executed on the form component, the parameter value is displayed in the URL.
https://mysite.com/;jsessionid=B85EE5CB0349CCA2FE37AF76AB5C30C1?wicket:bookmarkablePage=:com.mycompany.cheese.CheeseMain&Title=Havarti&group=cheeseName
It seems that PageParametersEncoder is used by default IPageParametersEncoder: Wicket Reference
Create IPageParametersEncoder with no parameters
NoParamsPageParametersEncoder.java
public class NoParamsPageParametersEncoder extends PageParametersEncoder {
public NoParamsPageParametersEncoder() {
super();
}
@Override
public Url encodePageParameters(final PageParameters pageParameters) {
Url url = new Url();
//Return URL as is
return url;
}
}
It seems that you can specify this at the time of mounting
WicketApplication.java
mount(new MountedMapper("/NextPage", NextPage.class, new NoParamsPageParametersEncoder()));
And pass it with parameters from the form
PrevPage.java
StatelessForm<PrevPage> inputForm = new StatelessForm<PrevPage>("inputForm") {
@Override
protected void onSubmit() {
PageParameters newParams = new PageParameters();
newParams.set("USER", "user_id");
newParams.set("PASSWD", "password");
setResponsePage(new NextPage(newParams));
}
};
By the way, it was possible with both Form and StatelessForm.
There are few Wicket related documents ...