Ok, I understand that use-case now. Though...
Looking at PageLink for the first time in a long while I see a Page in
the constructor and I naturelly create a Page to pass into it.
Furthermore when I brought up this issue a month ago this is exactly
what I was *told* to do (i.e. eager construction). So I don't think I'm
the only one who mistakenly triggered eager construction.
Maybe we could add a small note to the IPageLink constructor to the
effect of "this constructor is ideal for constructing pages lazily"
while the Page constructor should read "this constructor is ideal if a
Page object was passed in from a previous page."
Gili
Igor Vaynberg wrote:
Using pass-by-references encourages null pointer exceptions, should we
switch to pass-by-value only?
Its there because it is very convinient and using it IN NO WAY ENCOURAGES
YOU TO CREATE THE PAGE INSTANCE!
Ie
class EditUserPage {
public EditUserPage(WebPage backPage) {
add(new PageLink("backlink", backPage));
}
}
-Igor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gili
Sent: Saturday, August 20, 2005 1:19 PM
To: [email protected]
Subject: Re: [Wicket-user] PageLink and lazy Page construction
That was uncalled for. I did look at Linkomatic and the
Javadoc. I'm simply wondering why do we provide such methods
in PageLink if they encourage eager page construction? Aren't
we trying to avoid this sort of thing?
Gili
Igor Vaynberg wrote:
You would actually have to look at the code and examples to figure
this out
:)
-Igor
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christian Essl
Sent: Saturday, August 20, 2005 12:47 PM
To: [email protected]
Subject: Re: [Wicket-user] PageLink and lazy Page construction
I think you should use a new PageLink(String id, IPageLink
pageLink) which does onClick() init or use a BookmarkablePageLink.
Christian
On Sat, 20 Aug 2005 15:15:39 -0400, Gili <[EMAIL PROTECTED]>
wrote:
Hi,
Correct me if I'm wrong but when one uses PageLink and
passes in a
Page object (you have to construct it yourself) won't you
end up with
an expensive cascade of Page construction? Meaning, Page1 links to
Page2 links to Page3. When I construct a PageLink to Page2, its
constructor gets invoked, and in its constructor it links
to Page3, so
*its* constructor gets invoked.
I remember a while ago we discussed why PageLink doesn't have a
constructor that takes in a PageParameters argument ... but
in light
of this, don't we need one? I'm looking for a way for page
construction to always occur lazily.
Gili
--
Christian Essl
___________________________________________________________
Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier
anmelden: http://mail.yahoo.de
-------------------------------------------------------
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
-------------------------------------------------------
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
--
http://www.desktopbeautifier.com/
-------------------------------------------------------
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
-------------------------------------------------------
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
--
http://www.desktopbeautifier.com/
-------------------------------------------------------
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