from looking at the current code it is ok, but later who knows? the contract
on decode() is not defined for as far as when it is called, so the best way
is to create the page lazily in irequesttarget.respond().

my two cents.

-igor


On 5/8/07, Jeremy Thomerson <[EMAIL PROTECTED]> wrote:

Just to verify - I have a lot of IRequestTargetUrlCodingStrategy
implementations so that all of my URLs are very clean and search engine
friendly.  In the decode method, I typically create a PageRequestTarget,
with a new Page being passed to the constructor.

This is an okay place to be creating a Page instance, correct?  As it will
only be called once the strategy has confirmed that it matches, and the page
created will be the one used to be rendered?

Just wanted to make sure that I wasn't creating pages unnecessarily.

Thanks!
Jeremy Thomerson

On 5/7/07, Igor Vaynberg <[EMAIL PROTECTED]> wrote:
>
> 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
>
>

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

Reply via email to