On 8/11/05, Johan Compagner <[EMAIL PROTECTED]> wrote:
> path=x is the pointer for wicket to lookup the component which it must
> use to render you're page.
> if you erase path=x then it can't lookup anything and it will create a
> new page.
> This doesn't have anything to do with versioning. Because then you will
> keep the same component/page
> but we will record changes to it.

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.

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.

> If you really want the same page then before then you just must hold
> that page and call:
> 
> so the first thing you want is in a link that does:
> setResponsePage(yourePageInstance)
> 
> the second is a link that does setReponsePage(new YourePage()) this will
> increment path because
> a new component/page is created. Or do something like
> setResponsePage(yourePageInstance.clearData())
> (and that clearData is something of yourself)

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.

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.

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?

I want to reuse current (that is, most recent) instance of page, and
if it is not created yet, to create it.

Michael.


-------------------------------------------------------
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