I would say that this is sort of versioning too. With versioning you
record changes to one page/component (it is done on page level, is
it?). With the approach to creating components you create a new
component when I navigate to a page, while leaving previous components
in the memory, I still can navigate to them if I use proper number in
path parameter.
yes and you also can navigate to them just have the Link (the java object) have that Page instance

Only if you redirect to a class (setResponsePAge(Page.class)) we will create a new page.
This is done in more then one way. Can do do it completely youreself.
or Links that you click on redirect also by default to a new instance of a page class.
Then you will get a new path=x.

Bookmarkable pages (and homepage) are also class redirects. So yes then also a new page will be created.

If I understand correctly, the primary idea to create new components
is when I open the same link in a new window. This way I would have
two windows and two different versions (or whatever you call them) of
pages. But it is not always the case, quite contrary, most people just
click on a link and open it in the same window.
browser windows have nothing to do with it. Think only in server side pages.
Wicket does have special popup window support.


I am slow today, so let's start again :) I would like to have two
types of links. One link, with some well-known parameter (I talk about
real link on HTML page) would cause creation of new component. Another
link, without parameter, would load existing component.
what do you mean with parameters? if they are application links then you shouldn't control those links you should only control what to do when that link gets clicked on. See PageLink and all other links implementations.

Let's return to signin example. I look at index.html , and it has
nothing besides <a href="signin">signin</a>. Then I look at
AuthenticatedWebPage and I see
  if (!signedIn)
  {
    // Redirect request to SignIn page
    redirectToInterceptPage(newPage(SignIn.class));
  }
This is fine, so suppose I create my own link type for initialization.
This link type would be identifed with some specific request parameter
name, right? Then for this type of link I will need to check if
component is alrready created. If it is, I want to reuse it.
if you create a Link instance on the server side then that link will create a url with like path=0:componentname

Please look at the LinkOMatic example application.

Where do I find existing component instance? newPage does not seem to
add Page to pageMap. redirectToInterceptPage() uses pageMap, but also
does not seem to add Page to a map. Even if it did, pages are
identified by ID, where would I get it?
You keep reference to them if you need them
See the PageLink class (that class has several constructors so that you can see how yoiu can redirect to pages)

We don't have something like a in mem accessiable page map where you can get instances from.
You could create this very easy by youre self.

Just make a BasePage for everything
That BasePage has a static map.
in the constructor of BasePage you add that page to that map (key can be the class)

johan



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to