You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Carlo Camerino <ca...@gmail.com> on 2009/08/07 13:29:56 UTC

How To Kill Previous Page

Hi,

I would like to ask if it's possible to kill the previous page out of the
pagestore.
I have this requirement in which i have a view screen which can be able to
delete or edit an entity.

My problem is that when the client copies the url and pastes it back the
client can go back to the previous page since the client can retrieve it
from the session store.

Is there  a way in which wicket can actually destroy the previous page?

the problem is the users can copy for exampler

View Page
wicket:interface=1

Acknowledgement Page
wicket:interface=2

The user can actually paste the url

wicket:interface=1 to the browser and still be able to view the record.

Is there any way for me to kill the page with id = 1?

Thanks A Lot
Carlo

Re: How To Kill Previous Page

Posted by Ryan <wi...@mandrake.us>.
It seems like this could also be done by maintaining some state in the
page/session. Then check the state in onBeforeRender and act
accordingly.

Simple example:

Constructor of View Page sets state to State 1
onBeforeRender checks that user is in State 1

Constructor of Ack. Page changes state to State 2

-Ryan

On Fri, Aug 07, 2009 at 07:29:56PM +0800, Carlo Camerino exclaimed:

>Hi,
>
>I would like to ask if it's possible to kill the previous page out of the
>pagestore.
>I have this requirement in which i have a view screen which can be able to
>delete or edit an entity.
>
>My problem is that when the client copies the url and pastes it back the
>client can go back to the previous page since the client can retrieve it
>from the session store.
>
>Is there  a way in which wicket can actually destroy the previous page?
>
>the problem is the users can copy for exampler
>
>View Page
>wicket:interface=1
>
>Acknowledgement Page
>wicket:interface=2
>
>The user can actually paste the url
>
>wicket:interface=1 to the browser and still be able to view the record.
>
>Is there any way for me to kill the page with id = 1?
>
>Thanks A Lot
>Carlo

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


Re: How To Kill Previous Page

Posted by Eelco Hillenius <ee...@gmail.com>.
If you never want to support back button behavior, that's easy, just
implement a dummy ISessionStore, or probably better (because you still
need to the current page to be in memory for call backs, implement a
dummy IPageStore. Basically like NonPageCachingDummyWebApplication in
WicketTester.

> what happens when you try to access a page that was taken away from the page
> map?

That'll be when a user presses the back button: that user will get an
error (not sure exactly which one from the top of my head). Best to
just implement and test when happens what yourself to make sure
everything is like you wanted.

Eelco

On Fri, Aug 7, 2009 at 1:54 PM, Carlo Camerino<ca...@gmail.com> wrote:
> i'm still looking at though, and probably would need to implement it soon.
>
> thanks for the reply
>
> On Fri, Aug 7, 2009 at 7:41 PM, Alex Objelean <al...@yahoo.com>wrote:
>
>>
>> getPage().getPageMap().remove(); ?
>>
>> Alex Objelean
>>
>>
>> carlo c wrote:
>> >
>> > Hi,
>> >
>> > I would like to ask if it's possible to kill the previous page out of the
>> > pagestore.
>> > I have this requirement in which i have a view screen which can be able
>> to
>> > delete or edit an entity.
>> >
>> > My problem is that when the client copies the url and pastes it back the
>> > client can go back to the previous page since the client can retrieve it
>> > from the session store.
>> >
>> > Is there  a way in which wicket can actually destroy the previous page?
>> >
>> > the problem is the users can copy for exampler
>> >
>> > View Page
>> > wicket:interface=1
>> >
>> > Acknowledgement Page
>> > wicket:interface=2
>> >
>> > The user can actually paste the url
>> >
>> > wicket:interface=1 to the browser and still be able to view the record.
>> >
>> > Is there any way for me to kill the page with id = 1?
>> >
>> > Thanks A Lot
>> > Carlo
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> 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: How To Kill Previous Page

Posted by Carlo Camerino <ca...@gmail.com>.
what happens when you try to access a page that was taken away from the page
map?
i'm still looking at though, and probably would need to implement it soon.

thanks for the reply

On Fri, Aug 7, 2009 at 7:41 PM, Alex Objelean <al...@yahoo.com>wrote:

>
> getPage().getPageMap().remove(); ?
>
> Alex Objelean
>
>
> carlo c wrote:
> >
> > Hi,
> >
> > I would like to ask if it's possible to kill the previous page out of the
> > pagestore.
> > I have this requirement in which i have a view screen which can be able
> to
> > delete or edit an entity.
> >
> > My problem is that when the client copies the url and pastes it back the
> > client can go back to the previous page since the client can retrieve it
> > from the session store.
> >
> > Is there  a way in which wicket can actually destroy the previous page?
> >
> > the problem is the users can copy for exampler
> >
> > View Page
> > wicket:interface=1
> >
> > Acknowledgement Page
> > wicket:interface=2
> >
> > The user can actually paste the url
> >
> > wicket:interface=1 to the browser and still be able to view the record.
> >
> > Is there any way for me to kill the page with id = 1?
> >
> > Thanks A Lot
> > Carlo
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: How To Kill Previous Page

Posted by Alex Objelean <al...@yahoo.com>.
getPage().getPageMap().remove(); ?

Alex Objelean


carlo c wrote:
> 
> Hi,
> 
> I would like to ask if it's possible to kill the previous page out of the
> pagestore.
> I have this requirement in which i have a view screen which can be able to
> delete or edit an entity.
> 
> My problem is that when the client copies the url and pastes it back the
> client can go back to the previous page since the client can retrieve it
> from the session store.
> 
> Is there  a way in which wicket can actually destroy the previous page?
> 
> the problem is the users can copy for exampler
> 
> View Page
> wicket:interface=1
> 
> Acknowledgement Page
> wicket:interface=2
> 
> The user can actually paste the url
> 
> wicket:interface=1 to the browser and still be able to view the record.
> 
> Is there any way for me to kill the page with id = 1?
> 
> Thanks A Lot
> Carlo
> 
> 

-- 
View this message in context: http://www.nabble.com/How-To-Kill-Previous-Page-tp24863148p24863291.html
Sent from the Wicket - User mailing list archive at Nabble.com.


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