hudi
hudi

Reputation: 16555

How to create wicket form with parameters

default form in wicket looks like

private class TournamentWebForm extends Form<Void> {

    private static final long serialVersionUID = 1L;

    public TournamentWebForm() {
        super("tournamentForm");
       // add componets ...
}

and then page looks like (important is number behind ?)

http://localhost:8080/tournament-system-web/home?19

but on the internet I found this page which is written in wicket too:

http://jizdenky.studentagency.cz/?wicket:interface=wicket-0:3:3:::

and when I search for ticket their form looks like:

http://jizdenky.studentagency.cz/Booking/from/BRNO/to/PRAHA/tarif/REGULAR/departure/20121213/retdep/20121213/return/false/ropen/false/credit/false/class/2.5#search-results

how I can create this form ?

UPDATE:

It look like that what page is return depends on last parameter in this case: #search-results how I can implement these feature ?

Upvotes: 0

Views: 261

Answers (2)

bert
bert

Reputation: 7696

You don 't.

What you see on the link above is the URL Wicket prior to version 1.5 created for statefull pages.

The secound URL is that of a BookmarkablePage with URL Parameters. See mounting pages

Follow the procedure in the link and pass the page parameters to your form via standard java options.

Upvotes: 1

Ian Marshall
Ian Marshall

Reputation: 760

Have you read about page parameters? You can find out something by visiting Apache Wicket's home page, and then following Reference guide, Wicket reference, Pages.

Enjoy?

Upvotes: 0

Related Questions