You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Daniele Dellafiore <il...@gmail.com> on 2009/04/15 11:22:05 UTC

Re: sessionsize of requestlogger

On Mon, Jan 12, 2009 at 5:43 PM, carloc <ca...@yahoo.com> wrote:

> What Page Does Wicket Store in its HttpSession?
> Is it bad to keep a reference to the previous pages in instance variables of
> new pages?

I am really interested in an answer about this two questions. I am
using 1.3 so I cannot use Page Reference mechanism.

Finally, I cannot find a way to recover the last Page in a non restful
way and as I stated in another mail, history.back does not work in all
conditions (i.e. submit that reload the page instead of calling a
setResponse)

-- 
Daniele Dellafiore
http://blog.ildella.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: sessionsize of requestlogger

Posted by Bernard <bh...@actrix.gen.nz>.
Igor,

Thanks for referring to Page#getPageReference.

Regarding the reload, I created my own error loading a page.

>On Fri, Apr 17, 2009 at 5:49 PM, Bernard <bh...@actrix.gen.nz> wrote:
>> I prefer not to instantiate a page with a non-default constructor
>> because it breaks if the user reloads it. How do we pass parameters
>> between pages except via query strings which I try to avoid for
>> various reasons?
>
>can you please explain this a bit more? it is perfectly normal to do
>setresponsepage(new edituserpage(usermodel));
>
>wicket will redirect to a GET url which will always properly load that
>instance of the page, not create a new one every time.
>
>you can pass page references around using Page#getPageReference,
>formerly Page#getPageId, and constructing a url to it using
>requestcycle.urlfor() method.
>
>-igor
>
[snip]


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: sessionsize of requestlogger

Posted by Igor Vaynberg <ig...@gmail.com>.
On Fri, Apr 17, 2009 at 5:49 PM, Bernard <bh...@actrix.gen.nz> wrote:
> I prefer not to instantiate a page with a non-default constructor
> because it breaks if the user reloads it. How do we pass parameters
> between pages except via query strings which I try to avoid for
> various reasons?

can you please explain this a bit more? it is perfectly normal to do
setresponsepage(new edituserpage(usermodel));

wicket will redirect to a GET url which will always properly load that
instance of the page, not create a new one every time.

you can pass page references around using Page#getPageReference,
formerly Page#getPageId, and constructing a url to it using
requestcycle.urlfor() method.

-igor

>
> Or as Daniele asked: Is there "a way to recover the last Page in a non
> restful way"?
>
> Is there any jira issue that tracks this subject?
>
> Bernard
>
> On Wed, 15 Apr 2009 09:09:12 -0700, you wrote:
>
>>On Wed, Apr 15, 2009 at 2:22 AM, Daniele Dellafiore <il...@gmail.com> wrote:
>>> On Mon, Jan 12, 2009 at 5:43 PM, carloc <ca...@yahoo.com> wrote:
>>>
>>>> What Page Does Wicket Store in its HttpSession?
>>
>>the last page accessed from every pagemap is stored in httpsession.
>>
>>>> Is it bad to keep a reference to the previous pages in instance variables of
>>>> new pages?
>>
>>when using diskpagestore there are certain usecases that break. if you
>>keep a page purely for navigation purposes it is fine. but if you
>>manipulate instance of a page from inside a page that holds a
>>reference to it it might lead to unintended sideeffects like your
>>changes to that instance being lost. this has to do with how
>>diskpagestore keeps each page separate and how it rewrites references
>>during serialization.
>>
>>-igor
>>
>>>
>>> I am really interested in an answer about this two questions. I am
>>> using 1.3 so I cannot use Page Reference mechanism.
>>>
>>> Finally, I cannot find a way to recover the last Page in a non restful
>>> way and as I stated in another mail, history.back does not work in all
>>> conditions (i.e. submit that reload the page instead of calling a
>>> setResponse)
>>>
>>> --
>>> Daniele Dellafiore
>>> http://blog.ildella.net/
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>> For additional commands, e-mail: users-help@wicket.apache.org
>>>
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>>For additional commands, e-mail: users-help@wicket.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: sessionsize of requestlogger

Posted by Bernard <bh...@actrix.gen.nz>.
It is tempting to use references of previous pages. But I understand
that "passing references between pages and page serialization don't
mix nicely"
http://mail-archives.apache.org/mod_mbox/wicket-dev/200903.mbox/%3C2e1ce7cd0903030143h4a525b8cu46915c799061a8d6@mail.gmail.com%3E

What would be the best Wicket way of letting the current page directly
modify the model of the previous page and then let the current page
show the previous page with the new model?

I prefer not to instantiate a page with a non-default constructor
because it breaks if the user reloads it. How do we pass parameters
between pages except via query strings which I try to avoid for
various reasons?

Or as Daniele asked: Is there "a way to recover the last Page in a non
restful way"?

Is there any jira issue that tracks this subject?

Bernard

On Wed, 15 Apr 2009 09:09:12 -0700, you wrote:

>On Wed, Apr 15, 2009 at 2:22 AM, Daniele Dellafiore <il...@gmail.com> wrote:
>> On Mon, Jan 12, 2009 at 5:43 PM, carloc <ca...@yahoo.com> wrote:
>>
>>> What Page Does Wicket Store in its HttpSession?
>
>the last page accessed from every pagemap is stored in httpsession.
>
>>> Is it bad to keep a reference to the previous pages in instance variables of
>>> new pages?
>
>when using diskpagestore there are certain usecases that break. if you
>keep a page purely for navigation purposes it is fine. but if you
>manipulate instance of a page from inside a page that holds a
>reference to it it might lead to unintended sideeffects like your
>changes to that instance being lost. this has to do with how
>diskpagestore keeps each page separate and how it rewrites references
>during serialization.
>
>-igor
>
>>
>> I am really interested in an answer about this two questions. I am
>> using 1.3 so I cannot use Page Reference mechanism.
>>
>> Finally, I cannot find a way to recover the last Page in a non restful
>> way and as I stated in another mail, history.back does not work in all
>> conditions (i.e. submit that reload the page instead of calling a
>> setResponse)
>>
>> --
>> Daniele Dellafiore
>> http://blog.ildella.net/
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>> For additional commands, e-mail: users-help@wicket.apache.org
>>
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
>For additional commands, e-mail: users-help@wicket.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: sessionsize of requestlogger

Posted by Igor Vaynberg <ig...@gmail.com>.
On Wed, Apr 15, 2009 at 2:22 AM, Daniele Dellafiore <il...@gmail.com> wrote:
> On Mon, Jan 12, 2009 at 5:43 PM, carloc <ca...@yahoo.com> wrote:
>
>> What Page Does Wicket Store in its HttpSession?

the last page accessed from every pagemap is stored in httpsession.

>> Is it bad to keep a reference to the previous pages in instance variables of
>> new pages?

when using diskpagestore there are certain usecases that break. if you
keep a page purely for navigation purposes it is fine. but if you
manipulate instance of a page from inside a page that holds a
reference to it it might lead to unintended sideeffects like your
changes to that instance being lost. this has to do with how
diskpagestore keeps each page separate and how it rewrites references
during serialization.

-igor

>
> I am really interested in an answer about this two questions. I am
> using 1.3 so I cannot use Page Reference mechanism.
>
> Finally, I cannot find a way to recover the last Page in a non restful
> way and as I stated in another mail, history.back does not work in all
> conditions (i.e. submit that reload the page instead of calling a
> setResponse)
>
> --
> Daniele Dellafiore
> http://blog.ildella.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org