On Fri, Apr 17, 2009 at 5:49 PM, Bernard <[email protected]> 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 <[email protected]> wrote:
>>> On Mon, Jan 12, 2009 at 5:43 PM, carloc <[email protected]> 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: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>>---------------------------------------------------------------------
>>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]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to