Re: one pass render, mounted page back button

2020-06-24 Thread Martijn Dashorst
The only (unreasonable) solution is to persist the data in some way so your
models can pull the updated data.

If it is temporary (i.e. not permanent cross sessions), then storing the
page data in the session will work. If it is more permanently tied to the
user, you can probably store it in the database.

You can easily bind components to session stored fields using property
models (PropertyModel.of(this, "session.banana")).

That said, storing stuff in the session can be tricky due to concurrency
issues.

Martijn


On Wed, Jun 24, 2020 at 5:44 PM Sven Meier  wrote:

> Hi Rob,
>
> without a redirect, your first page will be presented without page id in
> the url.
>
> Thus when you return back from another page, the browser will just
> request a fresh page. An F5 while on your first page should result in
> the same problem.
>
> I don't know how to square that circle.
>
> Have fun
> Sven
>
>
> On 24.06.20 17:12, Rob Audenaerde wrote:
> > Hi all,
> >
> > We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
> > reasons (reduce the number of redirects).
> >
> > However, this causes the back-button to behave differently.
> >
> > Before, when we update a part of the screen via ajax; then following a
> > link, then going back shows the page as it was after all the ajax stuff.
> > (which is really great for users)
> >
> > Now, it generates a clean new page without all the changes.
> >
> > What would be the best way to still work around is problem? Or is there a
> > simple fix?
> >
> > Thanks in advance,
> > Rob Audenaerde
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-- 
Become a Wicket expert, learn from the best: http://wicketinaction.com


Re: one pass render, mounted page back button

2020-06-24 Thread Rob Audenaerde
Hi Sven,

I only actually need 1 level of 'back'

I thought of two (far fetched?) things:

1. Have an unbeforeunload trigger some ajax request that might store the
state and return some id that could be stored in the window.history and
detect the back, retrieve the id, and instantiate a new page with the old
state that somehow should be stored server side
2. Have the ajax calls manipulate the window.history somehow (need to have
1 extra page version, not sure how)

Maybe I should give up and try to find if I can differ the strategy based
on the user agent, so Google sees nice stuff, but the user a ?1 etc

Does that make sense?


On Wed, Jun 24, 2020, 17:44 Sven Meier  wrote:

> Hi Rob,
>
> without a redirect, your first page will be presented without page id in
> the url.
>
> Thus when you return back from another page, the browser will just
> request a fresh page. An F5 while on your first page should result in
> the same problem.
>
> I don't know how to square that circle.
>
> Have fun
> Sven
>
>
> On 24.06.20 17:12, Rob Audenaerde wrote:
> > Hi all,
> >
> > We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
> > reasons (reduce the number of redirects).
> >
> > However, this causes the back-button to behave differently.
> >
> > Before, when we update a part of the screen via ajax; then following a
> > link, then going back shows the page as it was after all the ajax stuff.
> > (which is really great for users)
> >
> > Now, it generates a clean new page without all the changes.
> >
> > What would be the best way to still work around is problem? Or is there a
> > simple fix?
> >
> > Thanks in advance,
> > Rob Audenaerde
> >
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: one pass render, mounted page back button

2020-06-24 Thread Sven Meier

Hi Rob,

without a redirect, your first page will be presented without page id in 
the url.


Thus when you return back from another page, the browser will just 
request a fresh page. An F5 while on your first page should result in 
the same problem.


I don't know how to square that circle.

Have fun
Sven


On 24.06.20 17:12, Rob Audenaerde wrote:

Hi all,

We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
reasons (reduce the number of redirects).

However, this causes the back-button to behave differently.

Before, when we update a part of the screen via ajax; then following a
link, then going back shows the page as it was after all the ajax stuff.
(which is really great for users)

Now, it generates a clean new page without all the changes.

What would be the best way to still work around is problem? Or is there a
simple fix?

Thanks in advance,
Rob Audenaerde



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



one pass render, mounted page back button

2020-06-24 Thread Rob Audenaerde
Hi all,

We switched our app to use the renderstategy ONE_PASS_RENDER for SEO
reasons (reduce the number of redirects).

However, this causes the back-button to behave differently.

Before, when we update a part of the screen via ajax; then following a
link, then going back shows the page as it was after all the ajax stuff.
(which is really great for users)

Now, it generates a clean new page without all the changes.

What would be the best way to still work around is problem? Or is there a
simple fix?

Thanks in advance,
Rob Audenaerde