Hi,

If I get you right, you want to be able to have some pages that always
display their last state, right? What about trying the "Wicket no version
mapper" pattern? [1]

For you, getting rid of the version number in the URL is just a
side-effect, but it should do the trick. Plus, you can switch it on or off
on a per-page basis.

Sorry if I misunderstood you.

Regards,

Zala



1: http://stackoverflow.com/questions/8602489/delete-version-number-in-url



On Mon, Apr 10, 2017 at 8:08 PM, Entropy <[email protected]> wrote:

> I am trying to set this up.  I looked at some docs and I feel like
> creating a
> custom PageManager seems like what I want to do.  The thing is, no matter
> how I implement the getPage(int), the Wicket app behaves the same.  The
> back
> button still does it's default behavior every time.
>
> Here's what I did.  I capture the maximum page in touchPage(), and then
> getPage() returns it.  When I hit back during my process flow, initially I
> get a bunch of calls to getPage() which dutifully returns the currentPage I
> want.  But then, after that, touchPage is called with the prior page (the
> one the user is going BACK to).  What's more, it's called with an ID one
> GREATER than the maximum page ID as returned in getPage().
>
> getPage() is never called again in that request, and the app then renders
> the prior page, as if it ignored what getPage() returned.  It's like I am
> missing an additional change setting that would make touchPage() cooperate.
>
> I also tried raising a RestartResponseException from within the PageManager
> when BACK was hit, but that just got me sent to the error page.
>
> I overrode just the PageManager since I don't want to change how pages a
> created, just how they are re-used.  That's why i differed from
> SinglePageManager.  Am I doing anything obviously wrong?  It's all pretty
> simple right now.  i started small to try to build the complexity as I
> went,
> but since nothing I do actually changes the app behavior, I seem stuck.
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-back-button-behavior-tp4677587p4677649.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Je n'aime pas seulement ma vie, mais aussi celle des autres.

(Blade Runner)

Reply via email to