On Sun, Jun 22, 2008 at 12:03 PM, brian.diekelman <[EMAIL PROTECTED]> wrote:
>
>
> Passing a Page instance to the constructor of another Page doesn't sound
> right to me.  Again, it depends on what you're trying to do, but I haven't
> seen many instances where passing an instance of 'Page a' versus an IModel
> with the data 'Page a' is displaying is the 'right' thing to do (in my
> opinion).

actually passing a page into another page for a back reference is
perfectly suitable. as usual the thing to watch for is that you
properly use detachable models.

-igor


>
> So basically if it's worth it for you to grow the session size on the app
> server to avoid the overhead of re-querying it from the database, go
> crazy... but I don't think the UI framework is the best place to handle data
> caching.
>
>
>
> Serkan Camurcuoglu-2 wrote:
>>
>> Hi all,
>> I'm quite new to Wicket and I'd like to ask whether what I'm doing is
>> right. Say I have two pages A and B. Page A loads a list of information
>> from the database and keeps it in an instance field. When a link on page
>> A is clicked, a new page B is created and page A passes itself as one of
>> the constructor arguments of B. Page B displays the information and
>> includes a link at the bottom saying "Back". When this link is clicked,
>> Page B calls setResponsePage() using the instance of Page A that was
>> passed in its constructor, and Page A is displayed again.
>>
>> That way I believe that I avoid reloading the data from the database
>> again in Page A.
>>
>> But I think somewhere in the mail archives I've read that it's
>> recommended to use setResponsePage(Class) instead of using
>> setResponsePage(Page). So I'm wondering whether I'm doing it right, and
>> if there is a better way I'd like to learn it.
>>
>> Sorry if this is a dumb question but I want to be confident about what
>> I'm developing..
>>
>> Regards,
>>
>> SerkanC
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>>
>
> --
> View this message in context: 
> http://www.nabble.com/Best-practice-for-navigating-between-pages-tp18057162p18057871.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to