Skip to content

Commit

Permalink
Added paragraph about URL segment
Browse files Browse the repository at this point in the history
  • Loading branch information
bitstorm committed Jan 31, 2025
1 parent 50079d8 commit a83486b
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions wicket-user-guide/src/main/asciidoc/urls/urls_1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,24 @@ add(new Link<Void>("pageWithNamedIndexParam") {

The URL generated for the linked page (PageWithParameters) is the one seen at the beginning of the paragraph.

=== URL fragment

Starting from version 10.4.0 _PageParameters_ offers native support for URL fragment. Just use method _setFragment_ to specify fragment's value:

[source,java]
----
add(new Link<Void>("pageWithNamedIndexParam") {
@Override
public void onClick() {
PageParameters pageParameters = new PageParameters();
parameters.setFragment("fragmentValue");
//page url will have #fragmentValue at the end.
setResponsePage(PageWithParameters.class, pageParameters);
}
});
----

0 comments on commit a83486b

Please sign in to comment.