I think this has to do with the way wicket pages are managed in memory.
Each page gets it's id, that's the number in component parameter.
The pages are stored in pagemap. The pagemap is a map with limited size. Usually, there's 10 last pages stored in the pagemap. When new page is created and stored in pagemap, it gets it's id assigned. The id incremental.

So first in your case there was page with id 0 displayed.
Later, new page was created and displayed, it's new assigned id was 1.
Bookmarkable link creates a new page instance, thus the page gets new id. (Of course there are also other ways of creating page instances, not just bookmarkable links)

/forminput does not identifies the page to render. Form input is "application name". It's actually the URL wicket servlet is mapped to. (/forminput/*) you still have to know the id of page to render (the component attribute in URL)

The wicket example consits of separate wicket applications. Each application has one WicketServlet instance.

-Matej

Michael Jouravlev wrote:
Matej, thank you for the explanation. I still have couple of questions.

Johan, if you read this email, I see that you removed reference to
IRedirectListener as well as version number if page is not versioned.
Thanks, this is great news. I still do not quite understand the
following:

=== cut here === if you submit onces you get:
   /forminput?path=0
(component == path and version=0 and IRedirectListener interfaces are
removed now)
=== cut here ===
If "path" stands for number, I would get something like
   /forminput?5=0
Does not look right. I guess, I will still get
   /forminput?component=0
or how it is in the example that Matej commented,
   /forminput?component=5

Johan and Matej, I still did not get what exactly "component" is for.
Matej wrote that this is "path to the component, that is a target of
link action "5" means page with id "5" "

Is it some kind of bookmarking thing, that if I have several
components on a page that can be displayed either one or another, like
a panel, then this component id instructs which one to show? If it is
not for that, why is it needed in render request, because /forminput
already identifies which Page to render, right? And all input was sent
to Page in the input phase.

If I try http://www.wicket-library.com/wicket-examples/forminput
example, I submit a form and see
/forminput?component=0&version=0&interface=IRedirectListener . Ok
there is no version and interface anymore, but pay attention to
component number, it is "0". Then I go back to
http://www.wicket-library.com/wicket-examples/ page and select
forminput again. The very first URL is the same: /forminput, but after
I submit form, it changes to
/forminput?component=1&version=0&interface=IRedirectListener so the
component number increases.

Does this mean, that in one session, using the same link I have two
identical components? It continues to increment each time I go back
and select forminput again from samples menu.

Michael.

On 7/14/05, Matej Knopp <[EMAIL PROTECTED]> wrote:

Hmm.. I could briefly describe it.

The interaction is done in two phases.

1. Input phase
  The url looks like this

.../library?component=5.border.navigator.navigation.1.pageLink&version=0&interface=ILinkListener
   The parameters here:
     - component
             path to the component, that is a target of link action
               "5" means page with id "5", border.navigator...pageLink
                specifies the component on that page
     - version - page version
     - interface - specifies the function that will be called
                   on target object
           each of this interfaces (ILinkListener, IFormSubmitListener)
           contains only one method. That's the one that will be called.

Depending on rendering policy, the actual rendering can be done here as
well (but it's usually stored in buffer). This is because of hibernate
lazy binding, if I understand correctly.

2. Render phase (after redirect)
 ...library?component=7&version=0&interface=IRedirectListener

   - component - ID of page that will be rendered
   - version - desired version (version=0 could be hidden, IMHO)
   - interface - usually IRedirectListener (also could be hidden, I think).

 So basically the render url could be reduced to something like this
   ...libery?component=7

Please correct me, if I've written anything wrong. I think something
like this should be in wiki. But I don't dare to add it due to my lame
english :)

If you wonder why in library example when you click on page 2 or page 3
the url is so long, it's because that switching pages is done in one
request only. But it should be possible to do it in two request (with
redirect)

-Matej



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user




-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP,
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to