you should never have to create page instances that you are not going to
display. in case of pagelink - that constructor (String,Page) always gets
the newbies to do the wrong thing, just dont use it. best to create pages
lazily in link's onclick.
-igor
On 5/6/07, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:
All the examples seem to show components (Labels, custom components,
ListViews, Tables, etc) added to the page in the constructor. Is this
really the best place to add the components to the page? Or should you just
be setting up the model for the page in the constructor, and at a
later-pre-render time you construct the actual components that go in the
page?
My concern is that there are times that a page might be constructed but
not rendered. I'm not 100% sure this is the case, but it could easily be a
mistake by ones new to the framework that might be avoided by having a
separate place for component initialization. For instance, you might
construct a page for a PageLink, and you pass to the page constructor a
category. Then, to initialize a ListView of widgets that appear under that
category, the constructor loads stuff from the database. I suppose that the
constructor shouldn't load things, but rather be using a loadable model, but
newcomers might not know this. So, on a page, you construct the pages to
use in pagelinks, and you're doing a lot of unnecessary object construction,
and perhaps loading of database objects. Or, you have to use
BookmarkablePageLinks and PageParameters for everything.
Thoughts?
Thank you,
Jeremy Thomerson
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user