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


Re: the back button behavior

2018-06-19 Thread Sven Meier

Hi,

you can register a listener in your application's init() and handle the 
exception there:


getRequestCycleListeners().add(new AbstractRequestCycleListener() {

    @Override
    public IRequestHandler onException(RequestCycle cycle, Exception ex)
    {
        if (ex instanceof PageExpiredException) {
            // handle exception
        }

       return null;
    }
});

Have fun
Sven



Am 19.06.2018 um 19:26 schrieb christophe:

Hello Sven

First of all thank you very much for you very quick answer. And I do
apologize for not responding earlier. I have been quite busy lately and
perhaps distracted as well.

I did as you recommended. In other words I implemented the  class the link
suggests and configured the application .

IT works up to a certain point:
When I clink on the browser back button, a "stale page" page is displayed.
This is good as the "previous" page is not served by the application. THis
is aht I want... Well almost...
I have been unable to catech the exception not to find aly way to get Wicket
to "redisplay" the page I want or at least let me indicate vi a
seResponsePage what page I want it to display

Can you help me with this please?

Regards

Christophe

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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




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



Re: the back button behavior

2018-06-19 Thread christophe
Hello Sven

First of all thank you very much for you very quick answer. And I do
apologize for not responding earlier. I have been quite busy lately and
perhaps distracted as well.

I did as you recommended. In other words I implemented the  class the link
suggests and configured the application .

IT works up to a certain point:
When I clink on the browser back button, a "stale page" page is displayed.
This is good as the "previous" page is not served by the application. THis
is aht I want... Well almost...
I have been unable to catech the exception not to find aly way to get Wicket
to "redisplay" the page I want or at least let me indicate vi a
seResponsePage what page I want it to display

Can you help me with this please?

Regards

Christophe

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: the back button behavior

2018-05-07 Thread Sven Meier
Hi,

have you tried disabling the page store:

http://maciej-miklas.blogspot.de/2013/09/wicket-6-disable-page-serialization.html

You can keep the pageId of the last page in the session and redirect to it if a 
request to an expired page comes in.

Have fun
Sven


Am 7. Mai 2018 11:26:34 MESZ schrieb christophe 
:
>Hello
>
>My question/request is about the back button, or more to the point on
>how
>Wicket processes it and how the default behavior can ve overridden
>
>Let me explain the context of my question:
>I am developping an application ( a web based patient record managment
>design specifically for Africa).
>Users (MDs, nurses..) open pages to look up/create or modify patients,
>episodes of care, prescriptions
>I want to prevent any user from accessing (going back to) pages that
>were
>previosuly displayed. There are many reasons for that.
>What I currently do (an I am not too happy about the solution is
>1) let wicket redisplay  the "previous" page when the user clicks on
>the
>broser back button
>2) one displayed the page sends a message  to the back end with its ID
>(unique ID generated by the application)
>3) if the ID is not the ID of the LAST page, the application redisplays
>the
>last page (hence, overlaying th eprevious on)
>
>It creates an awful lot of useless HTML traffic  and it is ugly
>
>Hence my question 
>Is there any way I can force wicket/my aplication to display the LAST
>page
>anytime the user clicks on the browser's back button
>
>Thank you very much
>
>Christophe Montagne
>
>--
>Sent from:
>http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html
>
>-
>To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>For additional commands, e-mail: users-h...@wicket.apache.org


the back button behavior

2018-05-07 Thread christophe
Hello

My question/request is about the back button, or more to the point on how
Wicket processes it and how the default behavior can ve overridden

Let me explain the context of my question:
I am developping an application ( a web based patient record managment
design specifically for Africa).
Users (MDs, nurses..) open pages to look up/create or modify patients,
episodes of care, prescriptions
I want to prevent any user from accessing (going back to) pages that were
previosuly displayed. There are many reasons for that.
What I currently do (an I am not too happy about the solution is
1) let wicket redisplay  the "previous" page when the user clicks on the
broser back button
2) one displayed the page sends a message  to the back end with its ID
(unique ID generated by the application)
3) if the ID is not the ID of the LAST page, the application redisplays the
last page (hence, overlaying th eprevious on)

It creates an awful lot of useless HTML traffic  and it is ugly

Hence my question 
Is there any way I can force wicket/my aplication to display the LAST page
anytime the user clicks on the browser's back button

Thank you very much

Christophe Montagne

--
Sent from: http://apache-wicket.1842946.n4.nabble.com/Users-forum-f1842947.html

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



Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-11 Thread Rob Audenaerde
As a follow up:

Is there a way to test the back-button (without firing up jetty and
resorting to selenium / htmlunit)?

btw: I know WicketTester has trimmed-down versions of certain components
(MockApplication(), MockPageManager etc).  Maybe there is an implementation
that keeps track of the pages so I might implement a MyWicketTester.back()?

Thanks!
-Rob

On Tue, Oct 10, 2017 at 7:27 PM, Sven Meier  wrote:

> Hi Rob,
>
> you're absolutely right: The issue's title should have been changed.
> I've missed the opportunity when I found the real error :(.
> Something to keep in mind for future changes!
>
> Sven
>
> Am 10. Oktober 2017 13:47:53 MESZ schrieb Rob Audenaerde <
> rob.audenae...@gmail.com>:
> >Hi Sven,
> >
> >Thanks for your reply!
> >
> >I was mistaken in believing 7.8.0 was still broken (perhaps not
> >cleaned-up
> >enough) and can confirm 7.8.0 fixes the issue.
> >
> >After reading it seems the title of the issue is slightly misleading
> >(as
> >you commented: This doesn't have anything to do with ModalWindow -
> >every
> >retrieval of previous pages from the page store fails:
> >)
> >
> >Maybe changing the title of the issue for the release notes is
> >something to
> >consider?
> >
> >Thanks,
> >-Rob
> >
> >On Tue, Oct 10, 2017 at 1:34 PM, Sven Meier  wrote:
> >
> >> That's WICKET-6387 probably.
> >>
> >> Regards
> >> Sven
> >>
> >> Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde <
> >> rob.audenae...@gmail.com>:
> >> >Hi all,
> >> >
> >> >We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now
> >we
> >> >see
> >> >that that back-button behaves differently?
> >> >Before, pressing back would return the page with all the ajax
> >> >modifications. After it seems to return an entirely new page.
> >> >
> >> >I could not find anything in the release notes that indicates a
> >change
> >> >here.
> >> >
> >> >Am I missing something?
> >> >
> >> >btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
> >> >
> >> >-Rob
> >>
>


Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Sven Meier
Hi Rob,

you're absolutely right: The issue's title should have been changed.
I've missed the opportunity when I found the real error :(.
Something to keep in mind for future changes!

Sven

Am 10. Oktober 2017 13:47:53 MESZ schrieb Rob Audenaerde 
:
>Hi Sven,
>
>Thanks for your reply!
>
>I was mistaken in believing 7.8.0 was still broken (perhaps not
>cleaned-up
>enough) and can confirm 7.8.0 fixes the issue.
>
>After reading it seems the title of the issue is slightly misleading
>(as
>you commented: This doesn't have anything to do with ModalWindow -
>every
>retrieval of previous pages from the page store fails:
>)
>
>Maybe changing the title of the issue for the release notes is
>something to
>consider?
>
>Thanks,
>-Rob
>
>On Tue, Oct 10, 2017 at 1:34 PM, Sven Meier  wrote:
>
>> That's WICKET-6387 probably.
>>
>> Regards
>> Sven
>>
>> Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde <
>> rob.audenae...@gmail.com>:
>> >Hi all,
>> >
>> >We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now
>we
>> >see
>> >that that back-button behaves differently?
>> >Before, pressing back would return the page with all the ajax
>> >modifications. After it seems to return an entirely new page.
>> >
>> >I could not find anything in the release notes that indicates a
>change
>> >here.
>> >
>> >Am I missing something?
>> >
>> >btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
>> >
>> >-Rob
>>


Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Rob Audenaerde
Hi Sven,

Thanks for your reply!

I was mistaken in believing 7.8.0 was still broken (perhaps not cleaned-up
enough) and can confirm 7.8.0 fixes the issue.

After reading it seems the title of the issue is slightly misleading (as
you commented: This doesn't have anything to do with ModalWindow - every
retrieval of previous pages from the page store fails:
)

Maybe changing the title of the issue for the release notes is something to
consider?

Thanks,
-Rob

On Tue, Oct 10, 2017 at 1:34 PM, Sven Meier  wrote:

> That's WICKET-6387 probably.
>
> Regards
> Sven
>
> Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde <
> rob.audenae...@gmail.com>:
> >Hi all,
> >
> >We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now we
> >see
> >that that back-button behaves differently?
> >Before, pressing back would return the page with all the ajax
> >modifications. After it seems to return an entirely new page.
> >
> >I could not find anything in the release notes that indicates a change
> >here.
> >
> >Am I missing something?
> >
> >btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
> >
> >-Rob
>


Re: back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Sven Meier
That's WICKET-6387 probably.

Regards
Sven

Am 10. Oktober 2017 12:04:33 MESZ schrieb Rob Audenaerde 
:
>Hi all,
>
>We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now we
>see
>that that back-button behaves differently?
>Before, pressing back would return the page with all the ajax
>modifications. After it seems to return an entirely new page.
>
>I could not find anything in the release notes that indicates a change
>here.
>
>Am I missing something?
>
>btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?
>
>-Rob


back button difference 7.6.0, 7.7.0, 7.8.0 and 7.9.0?

2017-10-10 Thread Rob Audenaerde
Hi all,

We upgraded some time ago from Wicket 7.6.0 to Wicket 7.7.0 and now we see
that that back-button behaves differently?
Before, pressing back would return the page with all the ajax
modifications. After it seems to return an entirely new page.

I could not find anything in the release notes that indicates a change
here.

Am I missing something?

btw. Wicket 7.8.0 also breaks it, but 7.9.0 seems to fix it?

-Rob


nice tutorial : "Call Apache Wicket from Javascript / Back Button Behavior"

2017-04-14 Thread Francois Meillet
For all those who are interested by this subject, have a look at this very good 
tutorial

https://twitter.com/apache_wicket/status/852786047746322434


François




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



Re: Wicket back button behavior

2017-04-10 Thread Entropy
Hmmm, it's not quite PERFECTLY what I was after, but it may be "close
enough".  When I go back, I am still taken to previous pages by virtue of
the mounted URLs, but I am no longer being taken to old VERSIONS of those
pages, which was the main problem.  

I'll have to check with my requirements team to verify that this is close
enough.  Thanks for the suggestion and quick reply!

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-back-button-behavior-tp4677587p4677651.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket back button behavior

2017-04-10 Thread Zala Pierre GOUPIL
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  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: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


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

(Blade Runner)


Re: Wicket back button behavior

2017-04-10 Thread Entropy
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: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: Wicket back button behavior

2017-04-04 Thread Martin Grigorov
Hi,

The Wicket way would be to roll your own IPageManager or IPageStore or
IDiskStore and implement #getPage(int pageId) in a such way so that it
always returns the last used page by the user (i.e. session).
You may use https://github.com/martin-g/single-page-instance as an
inspiration.

Otherwise you may also try to do it at the client side, i.e. with
JavaScript.
Play with History APIs - pushState(), replaceState(), history.forward(),
history.go(history.length-1), etc.

Martin Grigorov
Wicket Training and Consulting
https://twitter.com/mtgrigorov

On Mon, Apr 3, 2017 at 3:40 PM, Entropy  wrote:

> By default wicket does it's serialized back button thing.  For most of our
> apps, this has been fine.  We have a new one where this behavior, showing
> the page in a previous state and allowing the user to proceed from there,
> is
> completely inappropriate.
>
> Ideally, when a user tries to go back to a previous page version, I'd like
> to re-display the current page in it's current state (as if they hit reload
> instead).  Seems like since Wicket is tracking the page version in the
> query
> string that should be do-able.
>
> I found some articles suggesting how to put Wicket into a "stateless" mode
> where the page always displays the current/freshest data, but am not
> getting
> what I expect.
>
> I tried:
> getPageSettings().setVersionPagesByDefault(false);
>
> But this didn't seem to alter behavior at all.  I also tried:
> setStatelessHint(true);
>
> on my pages, and that didn't change any behavior either.  Maybe I'm barking
> up the wrong tree?  How can I get wicket to just re-render the current page
> in it's current state if the user tries to use the back button?  Basically
> just like as if they hit the reload button?
>
>
> --
> View this message in context: http://apache-wicket.1842946.
> n4.nabble.com/Wicket-back-button-behavior-tp4677587.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Wicket back button behavior

2017-04-03 Thread Entropy
By default wicket does it's serialized back button thing.  For most of our
apps, this has been fine.  We have a new one where this behavior, showing
the page in a previous state and allowing the user to proceed from there, is
completely inappropriate.  

Ideally, when a user tries to go back to a previous page version, I'd like
to re-display the current page in it's current state (as if they hit reload
instead).  Seems like since Wicket is tracking the page version in the query
string that should be do-able.  

I found some articles suggesting how to put Wicket into a "stateless" mode
where the page always displays the current/freshest data, but am not getting
what I expect.

I tried:
getPageSettings().setVersionPagesByDefault(false);

But this didn't seem to alter behavior at all.  I also tried:
setStatelessHint(true);

on my pages, and that didn't change any behavior either.  Maybe I'm barking
up the wrong tree?  How can I get wicket to just re-render the current page
in it's current state if the user tries to use the back button?  Basically
just like as if they hit the reload button?  


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Wicket-back-button-behavior-tp4677587.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-18 Thread Joachim Rohde
Strange, my reply on friday didn't make it to the mailing-list, so here once 
again:

Thanks to Thorsten Schöning & subes for their feedback, even though none of the 
suggestions worked for my case. But it
helped somehow to think about it from a different perspective. I was thinking 
way too complicated. (My solution is at
the end fo the mail).

@Thorsten:
The user is not the only criteria deciding the visibility. We have several 
links and a lot of them have additional
criteria depending on the state of the application. I am also aware of the 
discussion setVisible vs. isVisible. But on
our project we decided to use isVisible as long as there is no significant 
performance penalty.
Beside that after fixing the problem with the links, I could reproduce the 
problematic behaviour with other pages which
relied on the user-object.

@subes:
I tried also to call invalidate() in my signOut()-method which resulted in a 
stackoverflow since invalidate() calls
itself signout() which resulted in an endless loop.
And replaceSession() was also not helpful since Wicket tried to load the last 
page from the page store and render the
components which needed the user-object which was not there anymore.

How I fixed it:

In MySession I just check if the user is null and throw an PageExpiredException 
if it is.

   public User getUser() {
if (user == null) {
throw new PageExpiredException("No user available. Page seems to be 
expired.");
}
return user;
}

This way I'm always getting to the log-in page if the user-object does not 
exists. My initial thought was, to empty the
page store so that Wicket tries to create a new instance of the page and the 
AuthorizeInstantiation annotation would
have redirected to the login-page. Do not ask me why I was thinking so 
complicated in the beginning.

Have a nice weekend.

On 04/14/2016 03:35 PM, Joachim Rohde wrote:
> Hello,
> 
> short version of my question: how do I evict the page store to force Wicket 
> to create a new instance after using the
> back-button?
> 
> Longer version:
> 
> A user is redirected after login to my main page. On my main page I have 
> several links in onInitialize() which
> overwrites isVisible checking the role of the logged-in user, like this:
> 
> @AuthorizeInstantiation({MyRole.sAdmin})
> public abstract class AbstractSecureBasePage extends AbstractBasePage 
> implements ModelDetacher {
> [...]
> add(new Link("managementLink") {
> @Override
> public void onClick() {
> setResponsePage(Management.class);
> }
> 
> @Override
> public boolean isVisible() {
> return MySession.get().getUser().hasRole(MyRole.ADMIN);
> }
> });
> [...]
> }
> 
> My session:
> 
> public class MySession extends AuthenticatedWebSession {
> [...]
> @Override
> public void signOut() {
> 
> user = null;
> 
> final RequestCycle requestCycle = RequestCycle.get();
> 
> if (RequestCycle.get() != null && requestCycle.getRequest() != null
> && 
> ServletWebRequest.class.isAssignableFrom(RequestCycle.get().getRequest().getClass()))
>  {
> LOGGER.log(Level.FINE, "Invalidating HttpSession-object {0}",
> ((ServletWebRequest) 
> RequestCycle.get().getRequest()).getContainerRequest().getSession().getId());
> ((ServletWebRequest) 
> RequestCycle.get().getRequest()).getContainerRequest().getSession().invalidate();
> }
> super.signOut();
> }
> }
> 
> After the log-out the user is redirected back to the login-page. If the user 
> now click the browsers back button Wicket
> tries to fetch the last page from the page store and checks the links 
> visibility which will result in a
> NullPointerException due to the fact that getUser() returns null.
> 
> I attempted several solutions:
> 
> 1) Checking in every isVisible() if the user is null. This *does* work but I 
> have quite a lot of links and I would like
> to go with this solution only if I cannot find any other.
> 
> 2) Checking at the very beginning of onInitialize() if the user is null. This 
> does not work since the components are
> coming from the page store and onInitialize() is not called.
> 
> 3) Overwriting onBeforeRender() of the main page. This does not work since 
> it's only called if a component is visible.
> 
> 4) My next idea was, to empty the page store within my signOut-method.
> I tried several things:
>    getApplication().getSessionStore().destroy();
>getPageManager().clear();
>getPageManager().destroy()

Re: Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-15 Thread Joachim Rohde
Thanks to Thorsten Schöning & subes for their feedback, even though none of the 
suggestions worked for my case. But it
helped somehow to think about it from a different perspective. I was thinking 
way too complicated. (My solution is at
the end fo the mail).

@Thorsten:
The user is not the only criteria deciding the visibility. We have several 
links and a lot of them have additional
criteria depending on the state of the application. I am also aware of the 
discussion setVisible vs. isVisible. But on
our project we decided to use isVisible as long as there is no significant 
performance penalty.
Beside that after fixing the problem with the links, I could reproduce the 
problematic behaviour with other pages which
relied on the user-object.

@subes:
I tried also to call invalidate() in my signOut()-method which resulted in a 
stackoverflow since invalidate() calls
itself signout() which resulted in an endless loop.
And replaceSession() was also not helpful since Wicket tried to load the last 
page from the page store and render the
components which needed the user-object which was not there anymore.

How I fixed it:

In MySession I just check if the user is null and throw an PageExpiredException 
if it is.

   public User getUser() {
if (user == null) {
throw new PageExpiredException("No user available. Page seems to be 
expired.");
}
return user;
}

This way I'm always getting to the log-in page if the user-object does not 
exists. My initial thought was, to empty the
page store so that Wicket tries to create a new instance of the page and the 
AuthorizeInstantiation annotation would
have redirected to the login-page. Do not ask me why I was thinking so 
complicated in the beginning.

Have a nice weekend.

On 04/14/2016 03:35 PM, Joachim Rohde wrote:
> Hello,
> 
> short version of my question: how do I evict the page store to force Wicket 
> to create a new instance after using the
> back-button?
> 
> Longer version:
> 
> A user is redirected after login to my main page. On my main page I have 
> several links in onInitialize() which
> overwrites isVisible checking the role of the logged-in user, like this:
> 
> @AuthorizeInstantiation({MyRole.sAdmin})
> public abstract class AbstractSecureBasePage extends AbstractBasePage 
> implements ModelDetacher {
> [...]
> add(new Link("managementLink") {
> @Override
> public void onClick() {
> setResponsePage(Management.class);
> }
> 
> @Override
> public boolean isVisible() {
> return MySession.get().getUser().hasRole(MyRole.ADMIN);
> }
> });
> [...]
> }
> 
> My session:
> 
> public class MySession extends AuthenticatedWebSession {
> [...]
> @Override
> public void signOut() {
> 
> user = null;
> 
> final RequestCycle requestCycle = RequestCycle.get();
> 
> if (RequestCycle.get() != null && requestCycle.getRequest() != null
> && 
> ServletWebRequest.class.isAssignableFrom(RequestCycle.get().getRequest().getClass()))
>  {
> LOGGER.log(Level.FINE, "Invalidating HttpSession-object {0}",
> ((ServletWebRequest) 
> RequestCycle.get().getRequest()).getContainerRequest().getSession().getId());
> ((ServletWebRequest) 
> RequestCycle.get().getRequest()).getContainerRequest().getSession().invalidate();
> }
> super.signOut();
> }
> }
> 
> After the log-out the user is redirected back to the login-page. If the user 
> now click the browsers back button Wicket
> tries to fetch the last page from the page store and checks the links 
> visibility which will result in a
> NullPointerException due to the fact that getUser() returns null.
> 
> I attempted several solutions:
> 
> 1) Checking in every isVisible() if the user is null. This *does* work but I 
> have quite a lot of links and I would like
> to go with this solution only if I cannot find any other.
> 
> 2) Checking at the very beginning of onInitialize() if the user is null. This 
> does not work since the components are
> coming from the page store and onInitialize() is not called.
> 
> 3) Overwriting onBeforeRender() of the main page. This does not work since 
> it's only called if a component is visible.
> 
> 4) My next idea was, to empty the page store within my signOut-method.
> I tried several things:
>getApplication().getSessionStore().destroy();
>getPageManager().clear();
>getPageManager().destroy();
>getPageManager().commitRequest();
> None of them worked.
> 
> 

Re: Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-14 Thread Thorsten Schöning
Guten Tag Joachim Rohde,
am Donnerstag, 14. April 2016 um 15:35 schrieben Sie:

> 1) Checking in every isVisible() if the user is null. This *does*
> work but I have quite a lot of links and I would like
> to go with this solution only if I cannot find any other.
[...]
> Long story short: is there a more elegant solution to my problem
> than the first solution that I've tried?

I'm implementing a similar approach like you and am simply using a
custom base class for my links which need to be visible by some
criteria only. In this base class you can take a missing user object
because of no session into account at exactly one place. Your role
as the only deciding criteria for visibility or not could easily be
propagated using a CTOR or such.

Additionally, you should not override isVisible, but onConfigure
instead and call setVisible as needed.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning   E-Mail: thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

Telefon...05151-  9468- 55
Fax...05151-  9468- 88
Mobil..0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow


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



Re: Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-14 Thread subes
Or you are just missing a call to "Session.get().invalidate()" despite
calling "((ServletWebRequest) RequestCycle.get().getRequest(
)).getContainerRequest().getSession().invalidate();" on logout.

2016-04-14 15:59 GMT+02:00 subes :

> Hi,
>
> I had a similar problem while developing the model aware page cache in the
> NoWicket framework. I used a page factory wrapper to control when a new
> page or an old page is required.
>
> https://github.com/subes/invesdwin-nowicket/blob/master/invesdwin-nowicket-parent/invesdwin-nowicket/src/main/java/de/invesdwin/nowicket/application/filter/internal/ModelCacheUsingPageFactory.java
>
> Dunno if it completely matches your requirement, but I remember that
> fiddling with the PageStore directly was to no avail, so I had to get to a
> step before the page store was queried.
>
> Though since you are talking about login, maybe you are missing the
> creation of a fresh session upon login?
>
> See signIn method here:
> https://github.com/subes/invesdwin-nowicket/blob/master/invesdwin-nowicket-parent/invesdwin-nowicket/src/main/java/de/invesdwin/nowicket/application/auth/AWebSession.java
> Which calls "Session.get().replaceSession()" to start from fresh and thus
> get a new page instance on next request. It is a good idea regarding
> security to replace the session on signIn/signOut to prevent data leaks.
>
> Best regards,
> Edwin
>
> 2016-04-14 15:35 GMT+02:00 Joachim Rohde :
>
>> Hello,
>>
>> short version of my question: how do I evict the page store to force
>> Wicket to create a new instance after using the
>> back-button?
>>
>> Longer version:
>>
>> A user is redirected after login to my main page. On my main page I have
>> several links in onInitialize() which
>> overwrites isVisible checking the role of the logged-in user, like this:
>>
>> @AuthorizeInstantiation({MyRole.sAdmin})
>> public abstract class AbstractSecureBasePage extends AbstractBasePage
>> implements ModelDetacher {
>> [...]
>> add(new Link("managementLink") {
>> @Override
>> public void onClick() {
>> setResponsePage(Management.class);
>> }
>>
>> @Override
>> public boolean isVisible() {
>> return
>> MySession.get().getUser().hasRole(MyRole.ADMIN);
>> }
>> });
>> [...]
>> }
>>
>> My session:
>>
>> public class MySession extends AuthenticatedWebSession {
>> [...]
>> @Override
>> public void signOut() {
>>
>> user = null;
>>
>> final RequestCycle requestCycle = RequestCycle.get();
>>
>> if (RequestCycle.get() != null && requestCycle.getRequest() !=
>> null
>> &&
>> ServletWebRequest.class.isAssignableFrom(RequestCycle.get().getRequest().getClass()))
>> {
>> LOGGER.log(Level.FINE, "Invalidating HttpSession-object {0}",
>> ((ServletWebRequest)
>> RequestCycle.get().getRequest()).getContainerRequest().getSession().getId());
>> ((ServletWebRequest)
>> RequestCycle.get().getRequest()).getContainerRequest().getSession().invalidate();
>> }
>> super.signOut();
>> }
>> }
>>
>> After the log-out the user is redirected back to the login-page. If the
>> user now click the browsers back button Wicket
>> tries to fetch the last page from the page store and checks the links
>> visibility which will result in a
>> NullPointerException due to the fact that getUser() returns null.
>>
>> I attempted several solutions:
>>
>> 1) Checking in every isVisible() if the user is null. This *does* work
>> but I have quite a lot of links and I would like
>> to go with this solution only if I cannot find any other.
>>
>> 2) Checking at the very beginning of onInitialize() if the user is null.
>> This does not work since the components are
>> coming from the page store and onInitialize() is not called.
>>
>> 3) Overwriting onBeforeRender() of the main page. This does not work
>> since it's only called if a component is visible.
>>
>> 4) My next idea was, to empty the page store within my signOut-method.
>> I tried several things:
>>getApplication().getSessionStore().destroy();
>>getPageManager().clear();
>>getPageManager().destroy();
>>getPageManager().commitRequest();
>> None of them

Re: Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-14 Thread subes
Hi,

I had a similar problem while developing the model aware page cache in the
NoWicket framework. I used a page factory wrapper to control when a new
page or an old page is required.
https://github.com/subes/invesdwin-nowicket/blob/master/invesdwin-nowicket-parent/invesdwin-nowicket/src/main/java/de/invesdwin/nowicket/application/filter/internal/ModelCacheUsingPageFactory.java

Dunno if it completely matches your requirement, but I remember that
fiddling with the PageStore directly was to no avail, so I had to get to a
step before the page store was queried.

Though since you are talking about login, maybe you are missing the
creation of a fresh session upon login?

See signIn method here:
https://github.com/subes/invesdwin-nowicket/blob/master/invesdwin-nowicket-parent/invesdwin-nowicket/src/main/java/de/invesdwin/nowicket/application/auth/AWebSession.java
Which calls "Session.get().replaceSession()" to start from fresh and thus
get a new page instance on next request. It is a good idea regarding
security to replace the session on signIn/signOut to prevent data leaks.

Best regards,
Edwin

2016-04-14 15:35 GMT+02:00 Joachim Rohde :

> Hello,
>
> short version of my question: how do I evict the page store to force
> Wicket to create a new instance after using the
> back-button?
>
> Longer version:
>
> A user is redirected after login to my main page. On my main page I have
> several links in onInitialize() which
> overwrites isVisible checking the role of the logged-in user, like this:
>
> @AuthorizeInstantiation({MyRole.sAdmin})
> public abstract class AbstractSecureBasePage extends AbstractBasePage
> implements ModelDetacher {
> [...]
> add(new Link("managementLink") {
> @Override
> public void onClick() {
> setResponsePage(Management.class);
> }
>
> @Override
> public boolean isVisible() {
> return MySession.get().getUser().hasRole(MyRole.ADMIN);
> }
> });
> [...]
> }
>
> My session:
>
> public class MySession extends AuthenticatedWebSession {
> [...]
> @Override
> public void signOut() {
>
> user = null;
>
> final RequestCycle requestCycle = RequestCycle.get();
>
> if (RequestCycle.get() != null && requestCycle.getRequest() != null
> &&
> ServletWebRequest.class.isAssignableFrom(RequestCycle.get().getRequest().getClass()))
> {
> LOGGER.log(Level.FINE, "Invalidating HttpSession-object {0}",
> ((ServletWebRequest)
> RequestCycle.get().getRequest()).getContainerRequest().getSession().getId());
> ((ServletWebRequest)
> RequestCycle.get().getRequest()).getContainerRequest().getSession().invalidate();
> }
> super.signOut();
> }
> }
>
> After the log-out the user is redirected back to the login-page. If the
> user now click the browsers back button Wicket
> tries to fetch the last page from the page store and checks the links
> visibility which will result in a
> NullPointerException due to the fact that getUser() returns null.
>
> I attempted several solutions:
>
> 1) Checking in every isVisible() if the user is null. This *does* work but
> I have quite a lot of links and I would like
> to go with this solution only if I cannot find any other.
>
> 2) Checking at the very beginning of onInitialize() if the user is null.
> This does not work since the components are
> coming from the page store and onInitialize() is not called.
>
> 3) Overwriting onBeforeRender() of the main page. This does not work since
> it's only called if a component is visible.
>
> 4) My next idea was, to empty the page store within my signOut-method.
> I tried several things:
>getApplication().getSessionStore().destroy();
>getPageManager().clear();
>getPageManager().destroy();
>getPageManager().commitRequest();
> None of them worked.
>
> getPageManager().destroy(); provokes even a NullPointerException within
> Wicket itself (after using the back-button):
>
> java.lang.NullPointerException
>  at
> org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:203)
>  at
> org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:357)
>  at
> org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:82)
>  at
> org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
>  at
> org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAcc

Evicting the page store to force Wicket to create a new instance of a page after using the back-button

2016-04-14 Thread Joachim Rohde
Hello,

short version of my question: how do I evict the page store to force Wicket to 
create a new instance after using the
back-button?

Longer version:

A user is redirected after login to my main page. On my main page I have 
several links in onInitialize() which
overwrites isVisible checking the role of the logged-in user, like this:

@AuthorizeInstantiation({MyRole.sAdmin})
public abstract class AbstractSecureBasePage extends AbstractBasePage 
implements ModelDetacher {
[...]
add(new Link("managementLink") {
@Override
public void onClick() {
setResponsePage(Management.class);
}

@Override
public boolean isVisible() {
return MySession.get().getUser().hasRole(MyRole.ADMIN);
}
});
[...]
}

My session:

public class MySession extends AuthenticatedWebSession {
[...]
@Override
public void signOut() {

user = null;

final RequestCycle requestCycle = RequestCycle.get();

if (RequestCycle.get() != null && requestCycle.getRequest() != null
&& 
ServletWebRequest.class.isAssignableFrom(RequestCycle.get().getRequest().getClass()))
 {
LOGGER.log(Level.FINE, "Invalidating HttpSession-object {0}",
((ServletWebRequest) 
RequestCycle.get().getRequest()).getContainerRequest().getSession().getId());
((ServletWebRequest) 
RequestCycle.get().getRequest()).getContainerRequest().getSession().invalidate();
}
super.signOut();
}
}

After the log-out the user is redirected back to the login-page. If the user 
now click the browsers back button Wicket
tries to fetch the last page from the page store and checks the links 
visibility which will result in a
NullPointerException due to the fact that getUser() returns null.

I attempted several solutions:

1) Checking in every isVisible() if the user is null. This *does* work but I 
have quite a lot of links and I would like
to go with this solution only if I cannot find any other.

2) Checking at the very beginning of onInitialize() if the user is null. This 
does not work since the components are
coming from the page store and onInitialize() is not called.

3) Overwriting onBeforeRender() of the main page. This does not work since it's 
only called if a component is visible.

4) My next idea was, to empty the page store within my signOut-method.
I tried several things:
   getApplication().getSessionStore().destroy();
   getPageManager().clear();
   getPageManager().destroy();
   getPageManager().commitRequest();
None of them worked.

getPageManager().destroy(); provokes even a NullPointerException within Wicket 
itself (after using the back-button):

java.lang.NullPointerException
 at 
org.apache.wicket.page.PageStoreManager$SessionEntry.getPage(PageStoreManager.java:203)
 at 
org.apache.wicket.page.PageStoreManager$PersistentRequestAdapter.getPage(PageStoreManager.java:357)
 at 
org.apache.wicket.page.AbstractPageManager.getPage(AbstractPageManager.java:82)
 at 
org.apache.wicket.page.PageManagerDecorator.getPage(PageManagerDecorator.java:50)
 at 
org.apache.wicket.page.PageAccessSynchronizer$2.getPage(PageAccessSynchronizer.java:246)
 at 
org.apache.wicket.DefaultMapperContext.getPageInstance(DefaultMapperContext.java:113)
 at 
org.apache.wicket.core.request.handler.PageProvider.getStoredPage(PageProvider.java:299)
 at 
org.apache.wicket.core.request.handler.PageProvider.isNewPageInstance(PageProvider.java:211)
 at 
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.processHybrid(AbstractBookmarkableMapper.java:261)
 at 
org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(AbstractBookmarkableMapper.java:365)
 at 
org.apache.wicket.request.mapper.CompoundRequestMapper.mapRequest(CompoundRequestMapper.java:150)
 at 
org.apache.wicket.request.cycle.RequestCycle.resolveRequestHandler(RequestCycle.java:189)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:219)
 at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:293)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequestCycle(WicketFilter.java:261)
 at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:203)
 at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:284)
[...]

Line 203 of the PageStoreManager looks like:

// not found, ask pagestore for the page
return getPageStore().getPage(sessionId, id);

I am not sure if here should be a null-check on getPageStore (since I have no 
clue what should be returned if
getPageStore() returns null).

Long story short: is there a more elegant solution to my problem than the first 
solutio

after redirect to statefull page and browser back button results StalePageException

2014-06-18 Thread Rakesh A
Hi,
I've a link on the page, which requires a redirect to statefull page, and
the resultant page also has this type of link, upon clicking on it [on the
second page], and on the third page, if use the browser back button, I get
StalePageException.

Click on link - will result
a. Create a page instance
b. Update its model with some data
c. Redirect to this page instance using RestartResponseException

Steps i follow are
1. Click on a link which will do the above mentioned steps
2. On the resultant page of Step#1, click on the link again.
3. Step#2 will take me to a page
4. On this page use the browser back button.

Is there any way I can set some data in page modal after page gets
instantiated [only in special cases] ?

BTW: I am using Wicket v6.12.0

Thanks,
Rakesh.A

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/after-redirect-to-statefull-page-and-browser-back-button-results-StalePageException-tp4666311.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Back button

2014-03-07 Thread Martin Grigorov
Hi,

How do you load the model ?
If you use dynamic model, like LoadableDetachableModel, then each render of
the page will load its current state from the DB.
By default org.apache.wicket.markup.html.WebPage#setHeaders() disables the
caching so there shouldn't be such problem.

Martin Grigorov
Wicket Training and Consulting


On Fri, Mar 7, 2014 at 11:00 AM, Martin Dietze  wrote:

> In my application I have an editor page. Pretty often we run
> into the problem of users saving their work, then remembering
> that there was something missing and using their browser's back
> button to get back into the editor. Since they will be using an
> old instance of the page with the old object, saving will fail
> with an optimistic locking exception.
>
> I know that this is not a totally wicket-specific problem, but
> I'd like to ask how to deal with this problem best? Will headers
> forbidding any kind of caching for those pages help? Any other
> hints?
>
> Cheers,
>
> M'bert
>
> --
> --- / http://herbert.the-little-red-haired-girl.org /
> -
> =+=
> Eine Hund hat Herrchen und Frauchen..., eine Katze hat Personal!
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Back button

2014-03-07 Thread Martin Dietze
In my application I have an editor page. Pretty often we run
into the problem of users saving their work, then remembering
that there was something missing and using their browser's back
button to get back into the editor. Since they will be using an
old instance of the page with the old object, saving will fail
with an optimistic locking exception. 

I know that this is not a totally wicket-specific problem, but
I'd like to ask how to deal with this problem best? Will headers
forbidding any kind of caching for those pages help? Any other
hints?

Cheers,

M'bert

-- 
--- / http://herbert.the-little-red-haired-girl.org / -
=+= 
Eine Hund hat Herrchen und Frauchen..., eine Katze hat Personal!

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



Re: Back button behaviour

2013-11-26 Thread Martin Grigorov
Hi,

I am not sure that I understand you correctly but I think you can use
PageReference for this.
When moving from first page to the second page pass page.getPageReference()
to the second.
When the form in the second is submitted just do:
setResponsePage(pageReference.getPage())

This will return you to the first page exactly where you left it, i.e. same
state.


On Tue, Nov 26, 2013 at 4:52 PM, nerdek  wrote:

> Hi,
> I am trying to implement some kind of 'back button behaviour' but connected
> to f.e submit button.
>
> Example: first page with editor, a and second with form. When I submit the
> second page it should return to editor TO SAME PLACE as it was before (f.e
> edit button or sth)
>
> Is something in wicket that is already implemented for it ? I tried JQuery
> but sometimes it doesn't work, and I think there are simplier solutions.
>
> Thanks in advance
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Back-button-behaviour-tp4662679.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Back button behaviour

2013-11-26 Thread nerdek
Hi, 
I am trying to implement some kind of 'back button behaviour' but connected
to f.e submit button.

Example: first page with editor, a and second with form. When I submit the
second page it should return to editor TO SAME PLACE as it was before (f.e
edit button or sth)

Is something in wicket that is already implemented for it ? I tried JQuery
but sometimes it doesn't work, and I think there are simplier solutions.

Thanks in advance





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Back-button-behaviour-tp4662679.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Back button not calling onConfigure()

2013-11-06 Thread Martin Funk
Hi Arthur,

no worries. This was just a hint. Wireshark might look quite discouraging at 
first sight.

When it is started it will show all the network traffic on the machine, but 
that output can be filtered quite effectively.

If it is really important, then wireshark can analyse gigabyte big tcpdump 
files:
http://www.wireshark.org/docs/wsug_html_chunked/AppToolstcpdump.html

It depends on the pain, that bug is giving, but at least it would be known 
which request 'really' leaves the building.

mf

Am 06.11.2013 um 17:08 schrieb Artur Kronenberg 
:

> Hi Martin,
> 
> I had a quick read through it and this is not an option. I can't reproduce 
> the error and it is not given when it will reoccur. If I understood it 
> correctly I'd have to caputre all network traffic for my application until 
> the point the error occurs to be able to use wireshark and analyze it. This 
> won't be possble.
> 
> Thanks,
> 
> Artur
> 
> On 06/11/13 15:53, Martin Funk wrote:
>> Hi,
>> 
>> have you thought about wireshark?
>> 
>> Easy to set up and not all that hard to handle. Filters are powerful and 
>> most interestingly for Web-Development
>> ist the "Follow TCP stream" function.
>> http://www.wireshark.org/docs/wsug_html_chunked/ChAdvFollowTCPSection.html
>> 
>> 
>> mf
>> 
>> Am 06.11.2013 um 15:27 schrieb Artur Kronenberg 
>> :
>> 
>>> Hi,
>>> 
>>> I would expect it to hit the container. Debuggin and testing on a test 
>>> environment works and hits it. Unfortunatelly there is no way to definitely 
>>> proove that the error in question hits it to. I do know that the 
>>> onConfigure is not hit. I don't have access to the access logs.
>>> 
>>> Is there a way that the user uses a proxy that disables the response 
>>> headers we set for caching?
>>> 
>>> Thanks!
>>> 
>>> On 05/11/13 14:22, Martin Grigorov wrote:
>>>> Hi,
>>>> 
>>>> It looks like the page is loaded from the browser/proxy cache.
>>>> Can you verify that the web container is hit ? E.g. check its access logs
>>>> 
>>>> 
>>>> On Tue, Nov 5, 2013 at 4:05 PM, Artur Kronenberg <
>>>> artur.kronenb...@openmarket.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> I have a rather odd problem with a page of mine. The design is that the
>>>>> model on the page gets a flag set that indicates that the send button has
>>>>> been clicked (so the user doesn't send multiple times by clicking it
>>>>> vigurously over and over again).
>>>>> The problem now is that on browser back, the model is still created and
>>>>> the page can't be used.
>>>>> I overwrote the onConfigure method to set up my model correctly and
>>>>> everything works just fine. However there seems to be cases where the
>>>>> onConfigure method is not called?
>>>>> 
>>>>> Does anyone know of those cases? Can it have anything to do with the user
>>>>> using a proxy? A weird browser thing?
>>>>> 
>>>>> We set the response headers to:
>>>>> 
>>>>> Expires: -1
>>>>> Pragma: no-cache
>>>>> Cache-Control: no-cache, max-age=0, must-revalidate, no-store
>>>>> 
>>>>> This seems to be a very odd issue that I can not reproduce locally at all
>>>>> (I used to be able to by hitting the back button so I am guessing this is
>>>>> where things happen, but overwriting onConfigure fixed it for most cases).
>>>>> 
>>>>> Thanks!
>>>>> 
>>>>> Artur
>>>>> 
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>> 
>>>>> 
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Back button not calling onConfigure()

2013-11-06 Thread Artur Kronenberg

Hi Martin,

I had a quick read through it and this is not an option. I can't 
reproduce the error and it is not given when it will reoccur. If I 
understood it correctly I'd have to caputre all network traffic for my 
application until the point the error occurs to be able to use wireshark 
and analyze it. This won't be possble.


Thanks,

Artur

On 06/11/13 15:53, Martin Funk wrote:

Hi,

have you thought about wireshark?

Easy to set up and not all that hard to handle. Filters are powerful and most 
interestingly for Web-Development
ist the "Follow TCP stream" function.
http://www.wireshark.org/docs/wsug_html_chunked/ChAdvFollowTCPSection.html


mf

Am 06.11.2013 um 15:27 schrieb Artur Kronenberg 
:


Hi,

I would expect it to hit the container. Debuggin and testing on a test 
environment works and hits it. Unfortunatelly there is no way to definitely 
proove that the error in question hits it to. I do know that the onConfigure is 
not hit. I don't have access to the access logs.

Is there a way that the user uses a proxy that disables the response headers we 
set for caching?

Thanks!

On 05/11/13 14:22, Martin Grigorov wrote:

Hi,

It looks like the page is loaded from the browser/proxy cache.
Can you verify that the web container is hit ? E.g. check its access logs


On Tue, Nov 5, 2013 at 4:05 PM, Artur Kronenberg <
artur.kronenb...@openmarket.com> wrote:


Hi,

I have a rather odd problem with a page of mine. The design is that the
model on the page gets a flag set that indicates that the send button has
been clicked (so the user doesn't send multiple times by clicking it
vigurously over and over again).
The problem now is that on browser back, the model is still created and
the page can't be used.
I overwrote the onConfigure method to set up my model correctly and
everything works just fine. However there seems to be cases where the
onConfigure method is not called?

Does anyone know of those cases? Can it have anything to do with the user
using a proxy? A weird browser thing?

We set the response headers to:

Expires: -1
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store

This seems to be a very odd issue that I can not reproduce locally at all
(I used to be able to by hitting the back button so I am guessing this is
where things happen, but overwriting onConfigure fixed it for most cases).

Thanks!

Artur

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




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



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




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



Re: Back button not calling onConfigure()

2013-11-06 Thread Martin Funk
Hi,

have you thought about wireshark?

Easy to set up and not all that hard to handle. Filters are powerful and most 
interestingly for Web-Development
ist the "Follow TCP stream" function.
http://www.wireshark.org/docs/wsug_html_chunked/ChAdvFollowTCPSection.html


mf

Am 06.11.2013 um 15:27 schrieb Artur Kronenberg 
:

> Hi,
> 
> I would expect it to hit the container. Debuggin and testing on a test 
> environment works and hits it. Unfortunatelly there is no way to definitely 
> proove that the error in question hits it to. I do know that the onConfigure 
> is not hit. I don't have access to the access logs.
> 
> Is there a way that the user uses a proxy that disables the response headers 
> we set for caching?
> 
> Thanks!
> 
> On 05/11/13 14:22, Martin Grigorov wrote:
>> Hi,
>> 
>> It looks like the page is loaded from the browser/proxy cache.
>> Can you verify that the web container is hit ? E.g. check its access logs
>> 
>> 
>> On Tue, Nov 5, 2013 at 4:05 PM, Artur Kronenberg <
>> artur.kronenb...@openmarket.com> wrote:
>> 
>>> Hi,
>>> 
>>> I have a rather odd problem with a page of mine. The design is that the
>>> model on the page gets a flag set that indicates that the send button has
>>> been clicked (so the user doesn't send multiple times by clicking it
>>> vigurously over and over again).
>>> The problem now is that on browser back, the model is still created and
>>> the page can't be used.
>>> I overwrote the onConfigure method to set up my model correctly and
>>> everything works just fine. However there seems to be cases where the
>>> onConfigure method is not called?
>>> 
>>> Does anyone know of those cases? Can it have anything to do with the user
>>> using a proxy? A weird browser thing?
>>> 
>>> We set the response headers to:
>>> 
>>> Expires: -1
>>> Pragma: no-cache
>>> Cache-Control: no-cache, max-age=0, must-revalidate, no-store
>>> 
>>> This seems to be a very odd issue that I can not reproduce locally at all
>>> (I used to be able to by hitting the back button so I am guessing this is
>>> where things happen, but overwriting onConfigure fixed it for most cases).
>>> 
>>> Thanks!
>>> 
>>> Artur
>>> 
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>> 
>>> 
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
> 


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



Re: Back button not calling onConfigure()

2013-11-06 Thread Artur Kronenberg

Hi,

I would expect it to hit the container. Debuggin and testing on a test 
environment works and hits it. Unfortunatelly there is no way to 
definitely proove that the error in question hits it to. I do know that 
the onConfigure is not hit. I don't have access to the access logs.


Is there a way that the user uses a proxy that disables the response 
headers we set for caching?


Thanks!

On 05/11/13 14:22, Martin Grigorov wrote:

Hi,

It looks like the page is loaded from the browser/proxy cache.
Can you verify that the web container is hit ? E.g. check its access logs


On Tue, Nov 5, 2013 at 4:05 PM, Artur Kronenberg <
artur.kronenb...@openmarket.com> wrote:


Hi,

I have a rather odd problem with a page of mine. The design is that the
model on the page gets a flag set that indicates that the send button has
been clicked (so the user doesn't send multiple times by clicking it
vigurously over and over again).
The problem now is that on browser back, the model is still created and
the page can't be used.
I overwrote the onConfigure method to set up my model correctly and
everything works just fine. However there seems to be cases where the
onConfigure method is not called?

Does anyone know of those cases? Can it have anything to do with the user
using a proxy? A weird browser thing?

We set the response headers to:

Expires: -1
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store

This seems to be a very odd issue that I can not reproduce locally at all
(I used to be able to by hitting the back button so I am guessing this is
where things happen, but overwriting onConfigure fixed it for most cases).

Thanks!

Artur

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





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



Re: Back button not calling onConfigure()

2013-11-05 Thread Martin Grigorov
Hi,

It looks like the page is loaded from the browser/proxy cache.
Can you verify that the web container is hit ? E.g. check its access logs


On Tue, Nov 5, 2013 at 4:05 PM, Artur Kronenberg <
artur.kronenb...@openmarket.com> wrote:

> Hi,
>
> I have a rather odd problem with a page of mine. The design is that the
> model on the page gets a flag set that indicates that the send button has
> been clicked (so the user doesn't send multiple times by clicking it
> vigurously over and over again).
> The problem now is that on browser back, the model is still created and
> the page can't be used.
> I overwrote the onConfigure method to set up my model correctly and
> everything works just fine. However there seems to be cases where the
> onConfigure method is not called?
>
> Does anyone know of those cases? Can it have anything to do with the user
> using a proxy? A weird browser thing?
>
> We set the response headers to:
>
> Expires: -1
> Pragma: no-cache
> Cache-Control: no-cache, max-age=0, must-revalidate, no-store
>
> This seems to be a very odd issue that I can not reproduce locally at all
> (I used to be able to by hitting the back button so I am guessing this is
> where things happen, but overwriting onConfigure fixed it for most cases).
>
> Thanks!
>
> Artur
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Back button not calling onConfigure()

2013-11-05 Thread Artur Kronenberg

Hi,

I have a rather odd problem with a page of mine. The design is that the 
model on the page gets a flag set that indicates that the send button 
has been clicked (so the user doesn't send multiple times by clicking it 
vigurously over and over again).
The problem now is that on browser back, the model is still created and 
the page can't be used.
I overwrote the onConfigure method to set up my model correctly and 
everything works just fine. However there seems to be cases where the 
onConfigure method is not called?


Does anyone know of those cases? Can it have anything to do with the 
user using a proxy? A weird browser thing?


We set the response headers to:

Expires: -1
Pragma: no-cache
Cache-Control: no-cache, max-age=0, must-revalidate, no-store

This seems to be a very odd issue that I can not reproduce locally at 
all (I used to be able to by hitting the back button so I am guessing 
this is where things happen, but overwriting onConfigure fixed it for 
most cases).


Thanks!

Artur

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



RE: wicket single page application: replacing panels with ajax and back button support

2013-08-25 Thread Colin Rogers
Hi there,

I'm doing something in my code similar to what you are suggesting.

The way I do it is basically, each page that I'm navigation to, I call a method 
'cleverLink' rather than 'setResponsePage'.

'cleverLink' takes in a AjaxRequestTarget. That method then determines whether 
the page is swappable - if it's not it just sets the ResponsePage as normal. 
For the page to be swappable (in my code) the old page and the new page have to 
have the same entity, and be of the same base page class. Otherwise, things 
start breaking down! If the page has the same model, then I create the newPage, 
using the existing pageParameters/model, and simply access each of the main 
components using getters. Then, in the existing page, I replace (titlePanel, 
mainPanel, actionPanel etc.). I then clone these objects using 'WicketObjects' 
utility class (so as not to effect the 'new page') and 'replace' them in the 
existing old page, marking each one for update via the ajax target.

I then use a javascript 'historyPush' event to push the new URL to the browser, 
with the new Page ID from the new page (via getPageId() ), and the available 
pageParameters (there is a Wicket class that is good at resolving 
PageParameters - I can't remember what it is, and haven't my code to look it 
up). In order to get the page URLs is actually a massive pain for Wicket, 
especially if you us a combination of 'X', 'X/Y', 'X/Y/Z' paths. For this I 
have a utility method in my WicketApplication class to hold a map of the paths, 
created when mounting, for easy lookups. I still had problems with paths, and 
resorted to only one level in the end, as it was easier and less error prone.

You'll need to add some code to redirect via javascript, on back button 
presses, to the relevant page - but that is something there are plenty of 
articles on the net about that. It's not very efficient (as a back button press 
does a redirect), but it does work.

The net result is - each page has certain elements updated, and the URL is 
always correct, the back button works as does bookmarking. It's non-trivial and 
very specific to mine/your code, but it does work! Mine works on the basis that 
I only replace certain panels of a page (and leave some) so it has limitations 
when moving from one page, to another, with a different model and or base page.

Hope that is as clear as mud!

I'm sure this is breaking *something* in Wicket's standard model, so any ideas, 
improvements or pointers are welcome!

Cheers,
Col.


From: Maxim Solodovnik [solomax...@gmail.com]
Sent: 26 August 2013 01:22
To: users@wicket.apache.org
Subject: Re: wicket single page application: replacing panels with ajax and 
back button support

we did it in Apache Openmeetings project
https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/web/

not sure if it can be used as an example :) but it is working :)


On Sun, Aug 25, 2013 at 5:54 PM, Ilkka Seppälä  wrote:

> Hi,
>
> I'm guessing this is a common way to use Wicket but could not find
> solution.
>
> I want to create a single page application where navigation causes panels
> to be replaced with ajax. But the immediate problem that rises is how to
> make these different views bookmarkable and how to make browser's back
> button work as expected (return to previous view with the previous panel).
>
> -Ilkka
>



--
WBR
Maxim aka solomax
EMAIL DISCLAIMER This email message and its attachments are confidential and 
may also contain copyright or privileged material. If you are not the intended 
recipient, you may not forward the email or disclose or use the information 
contained in it. If you have received this email message in error, please 
advise the sender immediately by replying to this email and delete the message 
and any associated attachments. Any views, opinions, conclusions, advice or 
statements expressed in this email message are those of the individual sender 
and should not be relied upon as the considered view, opinion, conclusions, 
advice or statement of this company except where the sender expressly, and with 
authority, states them to be the considered view, opinion, conclusions, advice 
or statement of this company. Every care is taken but we recommend that you 
scan any attachments for viruses.

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



Re: wicket single page application: replacing panels with ajax and back button support

2013-08-25 Thread Maxim Solodovnik
we did it in Apache Openmeetings project
https://svn.apache.org/repos/asf/openmeetings/trunk/singlewebapp/src/main/java/org/apache/openmeetings/web/

not sure if it can be used as an example :) but it is working :)


On Sun, Aug 25, 2013 at 5:54 PM, Ilkka Seppälä  wrote:

> Hi,
>
> I'm guessing this is a common way to use Wicket but could not find
> solution.
>
> I want to create a single page application where navigation causes panels
> to be replaced with ajax. But the immediate problem that rises is how to
> make these different views bookmarkable and how to make browser's back
> button work as expected (return to previous view with the previous panel).
>
> -Ilkka
>



-- 
WBR
Maxim aka solomax


wicket single page application: replacing panels with ajax and back button support

2013-08-25 Thread Ilkka Seppälä
Hi,

I'm guessing this is a common way to use Wicket but could not find solution.

I want to create a single page application where navigation causes panels
to be replaced with ajax. But the immediate problem that rises is how to
make these different views bookmarkable and how to make browser's back
button work as expected (return to previous view with the previous panel).

-Ilkka


Re: Browser Back Button Question

2013-06-05 Thread dhongyt
I have such weird results too.

In Chrome Subscription Page would give me the session closed issue after
three clicks back, but then on a recent to the Download Page it would give
me a session closed also. Page session count seems to skip by two.

In Firefox Page session count is normal. Only pages that I get session
closed from is Subscription Page and when it displays my search results.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659247.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-06-04 Thread dhongyt
Is it a serialized object on the page? Or is it a serialized object on the
session object.
I have tried everything from removing the ProductAPI out.
Currently everything that is in my Session Service object should be
serialized I believe.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659241.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-06-03 Thread dhongyt
I think maybe it is because I have objects in my session service that connect
to the hiberlayer, to be more specific my Product API is a class that talks
with the hiberlayer.

1. Does that mean that I want to make my Product APIobject transient?
2. If an object implements serializable is that bad?
3. Easy way to hunt down the root cause?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659217.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-05-31 Thread Hans Lesmeister 2
Hi,


dhongyt wrote
> I'm wondering if its because of hibernate? Its trying to get the query of
> the page to display but the query has been closed?

You have serialized an object which contains properties proxied by
Hibernate. On deserializing, the proxy  tries to resolve with the now closed
embedded Hibernate Session.




-
-- 
Regards, 
Hans 

http://cantaa.de 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659180.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-05-30 Thread dhongyt
Are you telling me I should trying and stacktrace my pages or get more
details?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4659172.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-05-20 Thread Paul Bors
StackTrace?

~ Thank you,
   Paul Bors


On Thu, May 16, 2013 at 10:36 AM, dhongyt  wrote:

> After two or three back button on the browser an error message displays
> session closed.
> The error returned is a bit confusing:
>
>
> I'm wondering if its because of hibernate? Its trying to get the query of
> the page to display but the query has been closed? It also talks about
> errors with wicket to so I'm not sure, but the top error is hibernate.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4658863.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


Re: Browser Back Button Question

2013-05-16 Thread dhongyt
After two or three back button on the browser an error message displays
session closed.
The error returned is a bit confusing:


I'm wondering if its because of hibernate? Its trying to get the query of
the page to display but the query has been closed? It also talks about
errors with wicket to so I'm not sure, but the top error is hibernate.



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4658863.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-05-09 Thread dhongyt
Hey Martin,

I took a look at my catalina.out file and haven't noticed any errors.

I have changed my code from

to


It look like the back button worked but then I noticed that if I went back
twice it also gave me a session closed.

And nothing on the catalina.out log.

Anyone have this issue?



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397p4658689.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Browser Back Button Question

2013-04-29 Thread Martin Grigorov
Hi,


On Mon, Apr 29, 2013 at 10:07 PM, dhongyt  wrote:

> Hey guys,
>
> My question today is that when I click on a page link on my wicket
> application and hit back on the web browser I get a results of Session
> Closed.
>
>
Most probably the saving of the page in the store was not successful for
some reason.
Check your server logs.


> I'm not understanding why that is. I understand that wicket keeps version
> of
> your page which is why you have ?# at the end of your webpage link, is its
>

?# is to show you the same instance of the page when you use F5/Refresh
buttons.


> something with my server setup where I'm expiring my session too quickly?
> My
> tomcat manager page says that I expire my sessions > 30 minutes.
>
> Thanks!
> David
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
Wicket Training & Consulting
http://jWeekend.com <http://jweekend.com/>


Browser Back Button Question

2013-04-29 Thread dhongyt
Hey guys,

My question today is that when I click on a page link on my wicket
application and hit back on the web browser I get a results of Session
Closed.

I'm not understanding why that is. I understand that wicket keeps version of
your page which is why you have ?# at the end of your webpage link, is its
something with my server setup where I'm expiring my session too quickly? My
tomcat manager page says that I expire my sessions > 30 minutes.

Thanks!
David



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Browser-Back-Button-Question-tp4658397.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-27 Thread Jayakrishnan R
Hi Martin,

Thanks for the direction. I finally found the problem. The list of records
( collection ) was assigned to the data provider in the contructor of that
page. So when I press back button, the latest data was not getting
refreshed.

I still need to find a way to push the latest data on to the model.

Thanks
JK


On Mon, Mar 25, 2013 at 4:08 PM, Jayakrishnan R  wrote:

>
> Hi,
>
> Does that mean that the DataProvider returns primary key objects which are
> used in the LoadableDetachableModel to load the real object ?
>
> I am not sure. But one thing I noticed, the load() method of the
> LoadableDetachableModel is not being called when the back button is hit.
>
> I am getting exception the populateItem method .of the columns in the data
> table... see below.
>
>
> List> columns = new ArrayList>();
>
>columns.add(new AbstractColumn(
> new StringResourceModel("Record_number", this, null),
> "Record_number") {
>
> @Override
> public void populateItem(Item item, String id, IModel
> rowModel) {
> }};
>
>
>
>
>
> On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov wrote:
>
>> Hi,
>>
>> On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R 
>> wrote:
>>
>> > Hi All,
>> >
>> > In my application I am using *DefaultDataTable *with
>> > *SortableDataProvider *which
>> > has *LoadableDetachableModel *as the model.
>> >
>>
>> Does that mean that the DataProvider returns primary key objects which are
>> used in the LoadableDetachableModel to load the real object ?
>>
>> Check why your DataProvider returns (the ids of) deleted objects when back
>> button is used.
>>
>>
>> >
>> > I used it to display a set of records ( say RecordList page). When I
>> add or
>> > remove some records and load the page RecordList again, it displays the
>> > changes. However, if I use the back button of the browser and go the
>> > RecordList page which was rentered earlier ( before adding/ removing the
>> > records ). The *DefaultDataTable *still has the old sets of records.
>> This
>> > is a big issue when records are deleted.
>> >
>> > For example, If I delete a record and press back button then the page
>> fails
>> > as the record it is trying to show does not exist in the database.
>> Adding
>> > does not create an issue because it simply does not get listed in the
>> set
>> > of records.
>> >
>> > In another page, I just have *PageableListView *with *
>> > LoadableDetachableModel*. It works fine with out an issue.
>> >
>> > Can someone advice me on how to refresh the data table on browser back
>> > button ?
>> >
>> > --
>> > Thanks & Regards
>> > JK
>> >
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com <http://jweekend.com/>
>>
>
>
>
> --
> Thanks & Regards
> JK
>



-- 
Thanks & Regards
JK


Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Jayakrishnan R
Hi,
Does that mean that the DataProvider returns primary key objects which are
used in the LoadableDetachableModel to load the real object ?

I am not sure. But one thing I noticed, the load() method of the
LoadableDetachableModel is not being called when the back button is hit.

I am getting exception the populateItem method .of the columns in the data
table... see below.


List> columns = new ArrayList>();

   columns.add(new AbstractColumn(
new StringResourceModel("Record_number", this, null),
"Record_number") {

@Override
public void populateItem(Item item, String id, IModel rowModel)
{
}};





On Mon, Mar 25, 2013 at 3:55 PM, Martin Grigorov wrote:

> Hi,
>
> On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R  wrote:
>
> > Hi All,
> >
> > In my application I am using *DefaultDataTable *with
> > *SortableDataProvider *which
> > has *LoadableDetachableModel *as the model.
> >
>
> Does that mean that the DataProvider returns primary key objects which are
> used in the LoadableDetachableModel to load the real object ?
>
> Check why your DataProvider returns (the ids of) deleted objects when back
> button is used.
>
>
> >
> > I used it to display a set of records ( say RecordList page). When I add
> or
> > remove some records and load the page RecordList again, it displays the
> > changes. However, if I use the back button of the browser and go the
> > RecordList page which was rentered earlier ( before adding/ removing the
> > records ). The *DefaultDataTable *still has the old sets of records. This
> > is a big issue when records are deleted.
> >
> > For example, If I delete a record and press back button then the page
> fails
> > as the record it is trying to show does not exist in the database. Adding
> > does not create an issue because it simply does not get listed in the set
> > of records.
> >
> > In another page, I just have *PageableListView *with *
> > LoadableDetachableModel*. It works fine with out an issue.
> >
> > Can someone advice me on how to refresh the data table on browser back
> > button ?
> >
> > --
> > Thanks & Regards
> > JK
> >
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>



-- 
Thanks & Regards
JK


Re: Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Martin Grigorov
Hi,

On Mon, Mar 25, 2013 at 5:50 PM, Jayakrishnan R  wrote:

> Hi All,
>
> In my application I am using *DefaultDataTable *with
> *SortableDataProvider *which
> has *LoadableDetachableModel *as the model.
>

Does that mean that the DataProvider returns primary key objects which are
used in the LoadableDetachableModel to load the real object ?

Check why your DataProvider returns (the ids of) deleted objects when back
button is used.


>
> I used it to display a set of records ( say RecordList page). When I add or
> remove some records and load the page RecordList again, it displays the
> changes. However, if I use the back button of the browser and go the
> RecordList page which was rentered earlier ( before adding/ removing the
> records ). The *DefaultDataTable *still has the old sets of records. This
> is a big issue when records are deleted.
>
> For example, If I delete a record and press back button then the page fails
> as the record it is trying to show does not exist in the database. Adding
> does not create an issue because it simply does not get listed in the set
> of records.
>
> In another page, I just have *PageableListView *with *
> LoadableDetachableModel*. It works fine with out an issue.
>
> Can someone advice me on how to refresh the data table on browser back
> button ?
>
> --
> Thanks & Regards
> JK
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Wicket DefaultDataTable - Refresh it on browser back button

2013-03-25 Thread Jayakrishnan R
Hi All,

In my application I am using *DefaultDataTable *with
*SortableDataProvider *which
has *LoadableDetachableModel *as the model.

I used it to display a set of records ( say RecordList page). When I add or
remove some records and load the page RecordList again, it displays the
changes. However, if I use the back button of the browser and go the
RecordList page which was rentered earlier ( before adding/ removing the
records ). The *DefaultDataTable *still has the old sets of records. This
is a big issue when records are deleted.

For example, If I delete a record and press back button then the page fails
as the record it is trying to show does not exist in the database. Adding
does not create an issue because it simply does not get listed in the set
of records.

In another page, I just have *PageableListView *with *
LoadableDetachableModel*. It works fine with out an issue.

Can someone advice me on how to refresh the data table on browser back
button ?

-- 
Thanks & Regards
JK


Re: AbstractAjaxBehavior back button problem [SOLVED]

2013-03-16 Thread armandoxxx
Ok .. here is the solution !


When rendering Ajax callbackUrls you have to be careful that everytime
component is rendered you call behavior.getCallbackUrl() and set the new
value to javascript output !

Since I render urls in head tag ... with renderHead() method this is my
working example 




Regards

Armando



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293p4657297.html
Sent from the Users forum mailing list archive at Nabble.com.

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



AbstractAjaxBehavior back button problem

2013-03-16 Thread armandoxxx
Hey I have a tiny little problem with ajax behaviors and back button. 

I have a component (jQuery date picker that makes an ajax call to wicket
with selected date as parameter) which has an ajax behavior and renders it's
callbackUrl to head !

taken from components code:


If I select dates with this component and stay on the same page everything
works. 
If I go to next page and press back button Ajax request made by selecting a
date throws me:

org.apache.wicket.core.request.mapper.StalePageException
and I'm redirected on error page.

By debuging I figured out that when selecting a date (on page that I got to
by pressing back button) the whole page reloads and my behavior is not
called due to StalePageException...
Any tips to overcome this would be appreciated. 

Regards 

Armando





--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/AbstractAjaxBehavior-back-button-problem-tp4657293.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Does page know it was loaded with back button ?

2013-03-11 Thread armandoxxx
Hey .. 

my use case is actually very simple ... 

I have a page with charts .. and by pressing on chart point you get
redirected to another page with search results .. 
but there's a catch ... pages share search parameters .. which means by
selecting search parameters on one page, another page shows data for those
selected search parameters. 
So i thought I'd just cache my search params and ask if
(page.isCalledWithBackButton()) then load those search params ... 

but hey .. I think version will be fine ;) 

Regards

Armando









--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Does-page-know-it-was-loaded-with-back-button-tp4657158p4657162.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Does page know it was loaded with back button ?

2013-03-11 Thread Martin Grigorov
Hi,

No. This is just a normal request that contains the page version/id in the
url, e.g. some/url?3 - Wicket will load page with id==3 from the disk
store.
What is the use case ? Maybe there is another solution.


On Mon, Mar 11, 2013 at 4:26 PM, armandoxxx wrote:

> Hey
>
> Is there a way to know that page was loaded with pressing back button ?
>
> regards
>
> Armando
>
>
>
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Does-page-know-it-was-loaded-with-back-button-tp4657158.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Re: Expiration page not shown in case of back button usage

2012-12-19 Thread Thijs

Done: https://issues.apache.org/jira/browse/WICKET-4932
Thanks in advance for looking

On 19-12-2012 13:47, Martin Grigorov wrote:

Yes, please.


On Wed, Dec 19, 2012 at 2:16 PM, Thijs  wrote:


Hi,

I'm still battling this issue. I have a working quickstart that
demonstrates the issue we have.
Should I open a ticket?

Kind regards
Thijs


On 12-12-2012 15:07, Thijs wrote:


No it doesn't hit the browser cache.
It's actually recreating a new Page. We've put breakpoints in Wicket to
establish that.
In PageProvider is trying to create a new Instance see the stacktrace.

The following stacktrace is taken when we use the 'backspace' or 'back
button' in the browser after a session has expired.

[2012-12-12 14:42:11,535 TP-Processor11 ERROR 
org.apache.wicket.**DefaultExceptionMapper:$L]
Unexpected error occurred

org.apache.wicket.**WicketRuntimeException: Unable to create page from
class org.bar.bla.FooPage. Class does not have a visible default contructor.

at org.apache.wicket.session.**DefaultPageFactory.newPage(**
DefaultPageFactory.java:79)

at org.apache.wicket.**DefaultMapperContext.**newPageInstance(**
DefaultMapperContext.java:133)

at org.apache.wicket.core.**request.handler.PageProvider.**
resolvePageInstance(**PageProvider.java:278)

at org.apache.wicket.core.**request.handler.PageProvider.**
getPageInstance(PageProvider.**java:166)

at org.apache.wicket.request.**handler.render.PageRenderer.**
getPage(PageRenderer.java:78)

at org.apache.wicket.request.**handler.render.**
WebPageRenderer.renderPage(**WebPageRenderer.java:94)

at org.apache.wicket.request.**handler.render.**WebPageRenderer.respond(*
*WebPageRenderer.java:244)

at org.apache.wicket.core.**request.handler.**RenderPageRequestHandler.**
respond(**RenderPageRequestHandler.java:**165)

at org.apache.wicket.request.**cycle.RequestCycle$**
HandlerExecutor.respond(**RequestCycle.java:814)

at org.apache.wicket.request.**RequestHandlerStack.execute(**
RequestHandlerStack.java:64)

at org.apache.wicket.request.**cycle.RequestCycle.execute(**
RequestCycle.java:253)

at org.apache.wicket.request.**cycle.RequestCycle.**
processRequest(RequestCycle.**java:210)

at org.apache.wicket.request.**cycle.RequestCycle.**
processRequestAndDetach(**RequestCycle.java:281)

at org.apache.wicket.protocol.**http.WicketFilter.**
processRequest(WicketFilter.**java:188)

at org.apache.wicket.protocol.**http.WicketFilter.doFilter(**
WicketFilter.java:245)



Not that in this case we have a page mounted with no Default Constructor
or Constructor with page parameters because we only want a 'nice' url for
this page.

We also have situations where we have multiple entry points for a Web
application where one page can be reached with page parameters or through a
constructor taking an object. In both cases we don't want these pages to be
recreated when the session is expired.

Thijs

On 12-12-2012 9:40, Martin Grigorov wrote:


It seems that the browser tries to load the page from its cache.
I think you need to set proper cache headers to always ask the server
instead of using the local data.


On Tue, Dec 11, 2012 at 6:59 PM, Rob Sonke  wrote:

  Yes I know but by using the back button it seems to be ignored. Like it

tries to serve the same page no matter we have a session or not.


On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov 
wrote:
On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:

  Last week we fixed an issue with Wicket 6 where mounted pages were
being
reconstructed after the session expired. That was due to this (new)
setting


which we set to false now:

getPageSettings().**setRecreateMountedPagesAfterEx**piry(false);

This worked perfectly for clicking on (ajax) links but, this doesn't


seem
to work when I use the back button of the browser after the session

expired. What happens is that Wicket tries to reconstruct the previous
(mounted bookmarkable) page. But that's failing in our case because we


dont


support that as every page needs session information.

Am I doing something wrong? As I would expect a PageExpiredException
in
this case.

  If you need PEE then this is the correct setting.




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com  <http://jweekend.com/>







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



Re: Expiration page not shown in case of back button usage

2012-12-19 Thread Martin Grigorov
Yes, please.


On Wed, Dec 19, 2012 at 2:16 PM, Thijs  wrote:

> Hi,
>
> I'm still battling this issue. I have a working quickstart that
> demonstrates the issue we have.
> Should I open a ticket?
>
> Kind regards
> Thijs
>
>
> On 12-12-2012 15:07, Thijs wrote:
>
>> No it doesn't hit the browser cache.
>> It's actually recreating a new Page. We've put breakpoints in Wicket to
>> establish that.
>> In PageProvider is trying to create a new Instance see the stacktrace.
>>
>> The following stacktrace is taken when we use the 'backspace' or 'back
>> button' in the browser after a session has expired.
>>
>> [2012-12-12 14:42:11,535 TP-Processor11 ERROR 
>> org.apache.wicket.**DefaultExceptionMapper:$L]
>> Unexpected error occurred
>>
>> org.apache.wicket.**WicketRuntimeException: Unable to create page from
>> class org.bar.bla.FooPage. Class does not have a visible default contructor.
>>
>> at org.apache.wicket.session.**DefaultPageFactory.newPage(**
>> DefaultPageFactory.java:79)
>>
>> at org.apache.wicket.**DefaultMapperContext.**newPageInstance(**
>> DefaultMapperContext.java:133)
>>
>> at org.apache.wicket.core.**request.handler.PageProvider.**
>> resolvePageInstance(**PageProvider.java:278)
>>
>> at org.apache.wicket.core.**request.handler.PageProvider.**
>> getPageInstance(PageProvider.**java:166)
>>
>> at org.apache.wicket.request.**handler.render.PageRenderer.**
>> getPage(PageRenderer.java:78)
>>
>> at org.apache.wicket.request.**handler.render.**
>> WebPageRenderer.renderPage(**WebPageRenderer.java:94)
>>
>> at org.apache.wicket.request.**handler.render.**WebPageRenderer.respond(*
>> *WebPageRenderer.java:244)
>>
>> at org.apache.wicket.core.**request.handler.**RenderPageRequestHandler.**
>> respond(**RenderPageRequestHandler.java:**165)
>>
>> at org.apache.wicket.request.**cycle.RequestCycle$**
>> HandlerExecutor.respond(**RequestCycle.java:814)
>>
>> at org.apache.wicket.request.**RequestHandlerStack.execute(**
>> RequestHandlerStack.java:64)
>>
>> at org.apache.wicket.request.**cycle.RequestCycle.execute(**
>> RequestCycle.java:253)
>>
>> at org.apache.wicket.request.**cycle.RequestCycle.**
>> processRequest(RequestCycle.**java:210)
>>
>> at org.apache.wicket.request.**cycle.RequestCycle.**
>> processRequestAndDetach(**RequestCycle.java:281)
>>
>> at org.apache.wicket.protocol.**http.WicketFilter.**
>> processRequest(WicketFilter.**java:188)
>>
>> at org.apache.wicket.protocol.**http.WicketFilter.doFilter(**
>> WicketFilter.java:245)
>>
>> 
>>
>> Not that in this case we have a page mounted with no Default Constructor
>> or Constructor with page parameters because we only want a 'nice' url for
>> this page.
>>
>> We also have situations where we have multiple entry points for a Web
>> application where one page can be reached with page parameters or through a
>> constructor taking an object. In both cases we don't want these pages to be
>> recreated when the session is expired.
>>
>> Thijs
>>
>> On 12-12-2012 9:40, Martin Grigorov wrote:
>>
>>> It seems that the browser tries to load the page from its cache.
>>> I think you need to set proper cache headers to always ask the server
>>> instead of using the local data.
>>>
>>>
>>> On Tue, Dec 11, 2012 at 6:59 PM, Rob Sonke  wrote:
>>>
>>>  Yes I know but by using the back button it seems to be ignored. Like it
>>>> tries to serve the same page no matter we have a session or not.
>>>>
>>>>
>>>> On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov >>>
>>>>> wrote:
>>>>> On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:
>>>>>
>>>>>  Last week we fixed an issue with Wicket 6 where mounted pages were
>>>>>>
>>>>> being
>>>>
>>>>> reconstructed after the session expired. That was due to this (new)
>>>>>>
>>>>> setting
>>>>>
>>>>>> which we set to false now:
>>>>>>
>>>>>> getPageSettings().**setRecreateMountedPagesAfterEx**piry(false);
>>>>>>
>>>>>> This worked perfectly for clicking on (ajax) links but, this doesn't
>>>>>>
>>>>> seem
>>>>
>>>>> to work when I use the back button of the browser after the session
>>>>>> expired. What happens is that Wicket tries to reconstruct the previous
>>>>>> (mounted bookmarkable) page. But that's failing in our case because we
>>>>>>
>>>>> dont
>>>>>
>>>>>> support that as every page needs session information.
>>>>>>
>>>>>> Am I doing something wrong? As I would expect a PageExpiredException
>>>>>> in
>>>>>> this case.
>>>>>>
>>>>>>  If you need PEE then this is the correct setting.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Martin Grigorov
>>>>> jWeekend
>>>>> Training, Consulting, Development
>>>>> http://jWeekend.com  <http://jweekend.com/>
>>>>>
>>>>>
>>>
>>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Re: Expiration page not shown in case of back button usage

2012-12-19 Thread Thijs

Hi,

I'm still battling this issue. I have a working quickstart that 
demonstrates the issue we have.

Should I open a ticket?

Kind regards
Thijs

On 12-12-2012 15:07, Thijs wrote:

No it doesn't hit the browser cache.
It's actually recreating a new Page. We've put breakpoints in Wicket 
to establish that.

In PageProvider is trying to create a new Instance see the stacktrace.

The following stacktrace is taken when we use the 'backspace' or 'back 
button' in the browser after a session has expired.


[2012-12-12 14:42:11,535 TP-Processor11 ERROR 
org.apache.wicket.DefaultExceptionMapper:$L] Unexpected error occurred


org.apache.wicket.WicketRuntimeException: Unable to create page from 
class org.bar.bla.FooPage. Class does not have a visible default 
contructor.


at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:79)


at 
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)


at 
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)


at 
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)


at 
org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)


at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)


at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)


at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)


at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814)


at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)


at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)


at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)


at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)


at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)


at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)




Not that in this case we have a page mounted with no Default 
Constructor or Constructor with page parameters because we only want a 
'nice' url for this page.


We also have situations where we have multiple entry points for a Web 
application where one page can be reached with page parameters or 
through a constructor taking an object. In both cases we don't want 
these pages to be recreated when the session is expired.


Thijs

On 12-12-2012 9:40, Martin Grigorov wrote:

It seems that the browser tries to load the page from its cache.
I think you need to set proper cache headers to always ask the server
instead of using the local data.


On Tue, Dec 11, 2012 at 6:59 PM, Rob Sonke  wrote:


Yes I know but by using the back button it seems to be ignored. Like it
tries to serve the same page no matter we have a session or not.


On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov 
wrote:
On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:


Last week we fixed an issue with Wicket 6 where mounted pages were

being

reconstructed after the session expired. That was due to this (new)

setting

which we set to false now:

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

This worked perfectly for clicking on (ajax) links but, this doesn't

seem

to work when I use the back button of the browser after the session
expired. What happens is that Wicket tries to reconstruct the previous
(mounted bookmarkable) page. But that's failing in our case because we

dont

support that as every page needs session information.

Am I doing something wrong? As I would expect a PageExpiredException in
this case.


If you need PEE then this is the correct setting.




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com  <http://jweekend.com/>









Re: Expiration page not shown in case of back button usage

2012-12-12 Thread Thijs

No it doesn't hit the browser cache.
It's actually recreating a new Page. We've put breakpoints in Wicket to 
establish that.

In PageProvider is trying to create a new Instance see the stacktrace.

The following stacktrace is taken when we use the 'backspace' or 'back 
button' in the browser after a session has expired.


[2012-12-12 14:42:11,535 TP-Processor11 ERROR 
org.apache.wicket.DefaultExceptionMapper:$L] Unexpected error occurred


org.apache.wicket.WicketRuntimeException: Unable to create page from 
class org.bar.bla.FooPage. Class does not have a visible default contructor.


at 
org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:79)


at 
org.apache.wicket.DefaultMapperContext.newPageInstance(DefaultMapperContext.java:133)


at 
org.apache.wicket.core.request.handler.PageProvider.resolvePageInstance(PageProvider.java:278)


at 
org.apache.wicket.core.request.handler.PageProvider.getPageInstance(PageProvider.java:166)


at 
org.apache.wicket.request.handler.render.PageRenderer.getPage(PageRenderer.java:78)


at 
org.apache.wicket.request.handler.render.WebPageRenderer.renderPage(WebPageRenderer.java:94)


at 
org.apache.wicket.request.handler.render.WebPageRenderer.respond(WebPageRenderer.java:244)


at 
org.apache.wicket.core.request.handler.RenderPageRequestHandler.respond(RenderPageRequestHandler.java:165)


at 
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:814)


at 
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)


at 
org.apache.wicket.request.cycle.RequestCycle.execute(RequestCycle.java:253)


at 
org.apache.wicket.request.cycle.RequestCycle.processRequest(RequestCycle.java:210)


at 
org.apache.wicket.request.cycle.RequestCycle.processRequestAndDetach(RequestCycle.java:281)


at 
org.apache.wicket.protocol.http.WicketFilter.processRequest(WicketFilter.java:188)


at 
org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:245)




Not that in this case we have a page mounted with no Default Constructor 
or Constructor with page parameters because we only want a 'nice' url 
for this page.


We also have situations where we have multiple entry points for a Web 
application where one page can be reached with page parameters or 
through a constructor taking an object. In both cases we don't want 
these pages to be recreated when the session is expired.


Thijs

On 12-12-2012 9:40, Martin Grigorov wrote:

It seems that the browser tries to load the page from its cache.
I think you need to set proper cache headers to always ask the server
instead of using the local data.


On Tue, Dec 11, 2012 at 6:59 PM, Rob Sonke  wrote:


Yes I know but by using the back button it seems to be ignored. Like it
tries to serve the same page no matter we have a session or not.


On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov 
wrote:
On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:


Last week we fixed an issue with Wicket 6 where mounted pages were

being

reconstructed after the session expired. That was due to this (new)

setting

which we set to false now:

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

This worked perfectly for clicking on (ajax) links but, this doesn't

seem

to work when I use the back button of the browser after the session
expired. What happens is that Wicket tries to reconstruct the previous
(mounted bookmarkable) page. But that's failing in our case because we

dont

support that as every page needs session information.

Am I doing something wrong? As I would expect a PageExpiredException in
this case.


If you need PEE then this is the correct setting.




--
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>








Re: Expiration page not shown in case of back button usage

2012-12-12 Thread Martin Grigorov
It seems that the browser tries to load the page from its cache.
I think you need to set proper cache headers to always ask the server
instead of using the local data.


On Tue, Dec 11, 2012 at 6:59 PM, Rob Sonke  wrote:

> Yes I know but by using the back button it seems to be ignored. Like it
> tries to serve the same page no matter we have a session or not.
>
>
> On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov  >wrote:
>
> > On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:
> >
> > > Last week we fixed an issue with Wicket 6 where mounted pages were
> being
> > > reconstructed after the session expired. That was due to this (new)
> > setting
> > > which we set to false now:
> > >
> > > getPageSettings().setRecreateMountedPagesAfterExpiry(false);
> > >
> > > This worked perfectly for clicking on (ajax) links but, this doesn't
> seem
> > > to work when I use the back button of the browser after the session
> > > expired. What happens is that Wicket tries to reconstruct the previous
> > > (mounted bookmarkable) page. But that's failing in our case because we
> > dont
> > > support that as every page needs session information.
> > >
> > > Am I doing something wrong? As I would expect a PageExpiredException in
> > > this case.
> > >
> >
> > If you need PEE then this is the correct setting.
> >
> >
> >
> >
> > --
> > Martin Grigorov
> > jWeekend
> > Training, Consulting, Development
> > http://jWeekend.com <http://jweekend.com/>
> >
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Re: Expiration page not shown in case of back button usage

2012-12-11 Thread Rob Sonke
Yes I know but by using the back button it seems to be ignored. Like it
tries to serve the same page no matter we have a session or not.


On Tue, Dec 11, 2012 at 9:59 AM, Martin Grigorov wrote:

> On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:
>
> > Last week we fixed an issue with Wicket 6 where mounted pages were being
> > reconstructed after the session expired. That was due to this (new)
> setting
> > which we set to false now:
> >
> > getPageSettings().setRecreateMountedPagesAfterExpiry(false);
> >
> > This worked perfectly for clicking on (ajax) links but, this doesn't seem
> > to work when I use the back button of the browser after the session
> > expired. What happens is that Wicket tries to reconstruct the previous
> > (mounted bookmarkable) page. But that's failing in our case because we
> dont
> > support that as every page needs session information.
> >
> > Am I doing something wrong? As I would expect a PageExpiredException in
> > this case.
> >
>
> If you need PEE then this is the correct setting.
>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com <http://jweekend.com/>
>


Re: Expiration page not shown in case of back button usage

2012-12-11 Thread Martin Grigorov
On Mon, Dec 10, 2012 at 9:04 AM, Rob Sonke  wrote:

> Last week we fixed an issue with Wicket 6 where mounted pages were being
> reconstructed after the session expired. That was due to this (new) setting
> which we set to false now:
>
> getPageSettings().setRecreateMountedPagesAfterExpiry(false);
>
> This worked perfectly for clicking on (ajax) links but, this doesn't seem
> to work when I use the back button of the browser after the session
> expired. What happens is that Wicket tries to reconstruct the previous
> (mounted bookmarkable) page. But that's failing in our case because we dont
> support that as every page needs session information.
>
> Am I doing something wrong? As I would expect a PageExpiredException in
> this case.
>

If you need PEE then this is the correct setting.




-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Expiration page not shown in case of back button usage

2012-12-10 Thread Rob Sonke
Last week we fixed an issue with Wicket 6 where mounted pages were being
reconstructed after the session expired. That was due to this (new) setting
which we set to false now:

getPageSettings().setRecreateMountedPagesAfterExpiry(false);

This worked perfectly for clicking on (ajax) links but, this doesn't seem
to work when I use the back button of the browser after the session
expired. What happens is that Wicket tries to reconstruct the previous
(mounted bookmarkable) page. But that's failing in our case because we dont
support that as every page needs session information.

Am I doing something wrong? As I would expect a PageExpiredException in
this case.


Re: Custom back button functionality implementaion

2012-11-06 Thread Martin Grigorov
Hi,

In both X and Y you can use:

add(new Link("goToY") {
   public void onClick() {
 setResponsePage(new Y(getPageReference()));
   }
});


public class Y extends WebPage {
   public Y(final PageReference previousPageRef) {
  add(new Link("goBack") {
setResponsePage(previousPageRef.getPage());
  });
   }
}



On Tue, Nov 6, 2012 at 10:05 AM, wicket_new_user wrote:

> Hi,
> i'm new to Wicket framework and i have struck with the following issue,
> browsed google and the forum, but couldn't found the matching solution
>
> Issue is as follows
> ==
> There are 3 pages (say X, Y & Z)
>
> Z can be reached from X & Y
>
> If i've accessed Z via X page, and on clicking button (custom button), i
> need to navigate to X page
> Similarly if Z is accessed via Y page, it should navigate to Y page on
> custom back button.
>
> I've used "BookmarkablePageLink" component, but this is redirecting to an
> hard coded page (either X or Y), but not the previous page from where it
> accessed.
>
> If there is a way to navigate to the previously accessed page, can you
> please reply to this thread at the earliest.
>

If my answer wasn't too late please buy me a beer.


>
>
> thanks in advance
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/Custom-back-button-functionality-implementaion-tp4653645.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>


-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com <http://jweekend.com/>


Custom back button functionality implementaion

2012-11-06 Thread wicket_new_user
Hi,
i'm new to Wicket framework and i have struck with the following issue,
browsed google and the forum, but couldn't found the matching solution

Issue is as follows
==
There are 3 pages (say X, Y & Z)

Z can be reached from X & Y

If i've accessed Z via X page, and on clicking button (custom button), i
need to navigate to X page
Similarly if Z is accessed via Y page, it should navigate to Y page on
custom back button.

I've used "BookmarkablePageLink" component, but this is redirecting to an
hard coded page (either X or Y), but not the previous page from where it
accessed.

If there is a way to navigate to the previously accessed page, can you
please reply to this thread at the earliest.


thanks in advance



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Custom-back-button-functionality-implementaion-tp4653645.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Back Button Support Not Working in All Browser

2012-09-16 Thread mahulianand
i have used the 

form.setVersioned(true);

i am populating a table with rows at button click

when i populate and hit back button of the browser then in
Mozilla Firefox : it returns to previous state as expected
Internet Explorer : it goes to previous URL
Google Chrome : it shows page expired

do i have to do something different to manage version in different browser?

i have also attached  the screenshot for the same
http://apache-wicket.1842946.n4.nabble.com/file/n4652025/ref.jpg  



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Back-Button-Support-Not-Working-in-All-Browser-tp4652025.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: Back button doesn't work with AjaxTabbedPanel

2012-09-04 Thread Paul Bors
Yes.

It doesn't make sense to use Ajax to refresh a whole page anyhow unless your
tab panel is really just a small panel but then you won't be asking about
support for the browser's back button because you prob won't care :)

~ Thank you,
  Paul Bors

-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Tuesday, September 04, 2012 12:49 PM
To: users@wicket.apache.org
Subject: Re: Back button doesn't work with AjaxTabbedPanel

So, my conclusion from this discussion is that TabbedPanel should be used
instead of AjaxTabbedPanel if browser Back button needs to be supported with
a menu.

Thanks,

Alec

On Tue, Sep 4, 2012 at 9:48 AM, Paul Bors  wrote:
> You must be talking about the browser's navigation Back button.
> I through you had your own HTML button there for a second.
>
> In that case you're relying on Wicket to handle it and on its page map 
> mechanism.
> As explained earlier, an entry is not pushed for Ajax responses unless 
> you manually do so and you'd most likely have to use page constructors 
> with mapped arguments so that you can grab the tab number from the URL.
>
> See how the page maps work:
> https://cwiki.apache.org/WICKET/page-maps.html
>
> And the JavaDoc on PageParameters:
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/
> parame
> ter/PageParameters.html
>
> Not sure if you really want to go to this extreme, but feel free to do 
> so if you must.
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Alec Swan [mailto:alecs...@gmail.com]
> Sent: Saturday, September 01, 2012 12:05 PM
> To: users@wicket.apache.org
> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>
> How do I know when the back button is pressed?
>
> On Fri, Aug 31, 2012 at 6:48 PM, Paul Bors  wrote:
>> Can't you just keep a reference to the backPage and then simply call 
>> setResponsePage(backPage)?
>>
>> ~ Thank you,
>>   Paul Bors
>>
>> -Original Message-
>> From: Alec Swan [mailto:alecs...@gmail.com]
>> Sent: Friday, August 31, 2012 7:07 PM
>> To: users@wicket.apache.org
>> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>>
>> So, is there an easy way to support Back button with AjaxTabbedPanel?
>>
>> On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
>>> Well, I have other ajax interactions and I thought if I could fix 
>>> Back button for AjaxTabbedPanel I'd be able to fix it for other ajax 
>>> interactions.
>>>
>>> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>>>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>>>
>>>> Sven
>>>>
>>>>
>>>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>>>
>>>>> What can I do to allow user to go back to the previously selected 
>>>>> tab with a Back button? I tried the following approach but it 
>>>>> doesn't seem to work:
>>>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jq
>>>>> u
>>>>> e
>>>>> ry-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxB
>>>>> a
>>>>> c
>>>>> kButton.java
>>>>>
>>>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>>>
>>>>>> Swapping components via Ajax will not change the browser's page
>> history.
>>>>>> Thus the Back button works as expected - it takes you to the 
>>>>>> previous url.
>>>>>>
>>>>>> Sven
>>>>>>
>>>>>>
>>>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu 
>>>>>>> on the Main page which is mounted with mountBookmarkablePage. 
>>>>>>> For some reason the Back button in the browser  does not take 
>>>>>>> the user to the previously selected tab. It takes them out to 
>>>>>>> the page which was shown before user saw Main page for the first
time.
>>>>>>>
>>>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel?
>>>>>>> If so, why wouldn't it be working?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alec
>>>>>>>
>>&g

Re: Back button doesn't work with AjaxTabbedPanel

2012-09-04 Thread Alec Swan
So, my conclusion from this discussion is that TabbedPanel should be
used instead of AjaxTabbedPanel if browser Back button needs to be
supported with a menu.

Thanks,

Alec

On Tue, Sep 4, 2012 at 9:48 AM, Paul Bors  wrote:
> You must be talking about the browser's navigation Back button.
> I through you had your own HTML button there for a second.
>
> In that case you're relying on Wicket to handle it and on its page map
> mechanism.
> As explained earlier, an entry is not pushed for Ajax responses unless you
> manually do so and you'd most likely have to use page constructors with
> mapped arguments so that you can grab the tab number from the URL.
>
> See how the page maps work:
> https://cwiki.apache.org/WICKET/page-maps.html
>
> And the JavaDoc on PageParameters:
> http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parame
> ter/PageParameters.html
>
> Not sure if you really want to go to this extreme, but feel free to do so if
> you must.
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Alec Swan [mailto:alecs...@gmail.com]
> Sent: Saturday, September 01, 2012 12:05 PM
> To: users@wicket.apache.org
> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>
> How do I know when the back button is pressed?
>
> On Fri, Aug 31, 2012 at 6:48 PM, Paul Bors  wrote:
>> Can't you just keep a reference to the backPage and then simply call
>> setResponsePage(backPage)?
>>
>> ~ Thank you,
>>   Paul Bors
>>
>> -----Original Message-
>> From: Alec Swan [mailto:alecs...@gmail.com]
>> Sent: Friday, August 31, 2012 7:07 PM
>> To: users@wicket.apache.org
>> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>>
>> So, is there an easy way to support Back button with AjaxTabbedPanel?
>>
>> On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
>>> Well, I have other ajax interactions and I thought if I could fix
>>> Back button for AjaxTabbedPanel I'd be able to fix it for other ajax
>>> interactions.
>>>
>>> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>>>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>>>
>>>> Sven
>>>>
>>>>
>>>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>>>
>>>>> What can I do to allow user to go back to the previously selected
>>>>> tab with a Back button? I tried the following approach but it
>>>>> doesn't seem to work:
>>>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jqu
>>>>> e
>>>>> ry-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBa
>>>>> c
>>>>> kButton.java
>>>>>
>>>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>>>
>>>>>> Swapping components via Ajax will not change the browser's page
>> history.
>>>>>> Thus the Back button works as expected - it takes you to the
>>>>>> previous url.
>>>>>>
>>>>>> Sven
>>>>>>
>>>>>>
>>>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on
>>>>>>> the Main page which is mounted with mountBookmarkablePage. For
>>>>>>> some reason the Back button in the browser  does not take the
>>>>>>> user to the previously selected tab. It takes them out to the
>>>>>>> page which was shown before user saw Main page for the first time.
>>>>>>>
>>>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel?
>>>>>>> If so, why wouldn't it be working?
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Alec
>>>>>>>
>>>>>>> -
>>>>>>> -
>>>>>>> --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> -
>>>>>> -

RE: Back button doesn't work with AjaxTabbedPanel

2012-09-04 Thread Paul Bors
You must be talking about the browser's navigation Back button.
I through you had your own HTML button there for a second.

In that case you're relying on Wicket to handle it and on its page map
mechanism.
As explained earlier, an entry is not pushed for Ajax responses unless you
manually do so and you'd most likely have to use page constructors with
mapped arguments so that you can grab the tab number from the URL.

See how the page maps work:
https://cwiki.apache.org/WICKET/page-maps.html

And the JavaDoc on PageParameters:
http://wicket.apache.org/apidocs/1.5/org/apache/wicket/request/mapper/parame
ter/PageParameters.html

Not sure if you really want to go to this extreme, but feel free to do so if
you must.

~ Thank you,
  Paul Bors

-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Saturday, September 01, 2012 12:05 PM
To: users@wicket.apache.org
Subject: Re: Back button doesn't work with AjaxTabbedPanel

How do I know when the back button is pressed?

On Fri, Aug 31, 2012 at 6:48 PM, Paul Bors  wrote:
> Can't you just keep a reference to the backPage and then simply call 
> setResponsePage(backPage)?
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Alec Swan [mailto:alecs...@gmail.com]
> Sent: Friday, August 31, 2012 7:07 PM
> To: users@wicket.apache.org
> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>
> So, is there an easy way to support Back button with AjaxTabbedPanel?
>
> On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
>> Well, I have other ajax interactions and I thought if I could fix 
>> Back button for AjaxTabbedPanel I'd be able to fix it for other ajax 
>> interactions.
>>
>> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>>
>>> Sven
>>>
>>>
>>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>>
>>>> What can I do to allow user to go back to the previously selected 
>>>> tab with a Back button? I tried the following approach but it 
>>>> doesn't seem to work:
>>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jqu
>>>> e 
>>>> ry-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBa
>>>> c
>>>> kButton.java
>>>>
>>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>>
>>>>> Swapping components via Ajax will not change the browser's page
> history.
>>>>> Thus the Back button works as expected - it takes you to the 
>>>>> previous url.
>>>>>
>>>>> Sven
>>>>>
>>>>>
>>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on 
>>>>>> the Main page which is mounted with mountBookmarkablePage. For 
>>>>>> some reason the Back button in the browser  does not take the 
>>>>>> user to the previously selected tab. It takes them out to the 
>>>>>> page which was shown before user saw Main page for the first time.
>>>>>>
>>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel?
>>>>>> If so, why wouldn't it be working?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> -
>>>>>> -
>>>>>> --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>
>>>>>
>>>>> --
>>>>> -
>>>>> -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>> ---
>>>> -
>>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>
>>>
>>> 
>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



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



Re: Back button doesn't work with AjaxTabbedPanel

2012-09-01 Thread Alec Swan
How do I know when the back button is pressed?

On Fri, Aug 31, 2012 at 6:48 PM, Paul Bors  wrote:
> Can't you just keep a reference to the backPage and then simply call
> setResponsePage(backPage)?
>
> ~ Thank you,
>   Paul Bors
>
> -Original Message-
> From: Alec Swan [mailto:alecs...@gmail.com]
> Sent: Friday, August 31, 2012 7:07 PM
> To: users@wicket.apache.org
> Subject: Re: Back button doesn't work with AjaxTabbedPanel
>
> So, is there an easy way to support Back button with AjaxTabbedPanel?
>
> On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
>> Well, I have other ajax interactions and I thought if I could fix Back
>> button for AjaxTabbedPanel I'd be able to fix it for other ajax
>> interactions.
>>
>> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>>
>>> Sven
>>>
>>>
>>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>>
>>>> What can I do to allow user to go back to the previously selected
>>>> tab with a Back button? I tried the following approach but it
>>>> doesn't seem to work:
>>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jque
>>>> ry-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBac
>>>> kButton.java
>>>>
>>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>>
>>>>> Swapping components via Ajax will not change the browser's page
> history.
>>>>> Thus the Back button works as expected - it takes you to the
>>>>> previous url.
>>>>>
>>>>> Sven
>>>>>
>>>>>
>>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on
>>>>>> the Main page which is mounted with mountBookmarkablePage. For
>>>>>> some reason the Back button in the browser  does not take the user
>>>>>> to the previously selected tab. It takes them out to the page
>>>>>> which was shown before user saw Main page for the first time.
>>>>>>
>>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel?
>>>>>> If so, why wouldn't it be working?
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> Alec
>>>>>>
>>>>>> --
>>>>>> --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>>
>>>>>
>>>>> ---
>>>>> -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>> 
>>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



RE: Back button doesn't work with AjaxTabbedPanel

2012-08-31 Thread Paul Bors
Can't you just keep a reference to the backPage and then simply call
setResponsePage(backPage)?

~ Thank you,
  Paul Bors

-Original Message-
From: Alec Swan [mailto:alecs...@gmail.com] 
Sent: Friday, August 31, 2012 7:07 PM
To: users@wicket.apache.org
Subject: Re: Back button doesn't work with AjaxTabbedPanel

So, is there an easy way to support Back button with AjaxTabbedPanel?

On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
> Well, I have other ajax interactions and I thought if I could fix Back 
> button for AjaxTabbedPanel I'd be able to fix it for other ajax 
> interactions.
>
> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>
>> Sven
>>
>>
>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>
>>> What can I do to allow user to go back to the previously selected 
>>> tab with a Back button? I tried the following approach but it 
>>> doesn't seem to work:
>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jque
>>> ry-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBac
>>> kButton.java
>>>
>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>
>>>> Swapping components via Ajax will not change the browser's page
history.
>>>> Thus the Back button works as expected - it takes you to the 
>>>> previous url.
>>>>
>>>> Sven
>>>>
>>>>
>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on 
>>>>> the Main page which is mounted with mountBookmarkablePage. For 
>>>>> some reason the Back button in the browser  does not take the user 
>>>>> to the previously selected tab. It takes them out to the page 
>>>>> which was shown before user saw Main page for the first time.
>>>>>
>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel? 
>>>>> If so, why wouldn't it be working?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> --
>>>>> --- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>
>>>> ---
>>>> -- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>> 
>>> - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>

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



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



Re: Back button doesn't work with AjaxTabbedPanel

2012-08-31 Thread Alec Swan
So, is there an easy way to support Back button with AjaxTabbedPanel?

On Thu, Aug 30, 2012 at 1:04 PM, Alec Swan  wrote:
> Well, I have other ajax interactions and I thought if I could fix Back
> button for AjaxTabbedPanel I'd be able to fix it for other ajax
> interactions.
>
> On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
>> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>>
>> Sven
>>
>>
>> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>>
>>> What can I do to allow user to go back to the previously selected tab
>>> with a Back button? I tried the following approach but it doesn't seem
>>> to work:
>>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jquery-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBackButton.java
>>>
>>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>>
>>>> Swapping components via Ajax will not change the browser's page history.
>>>> Thus the Back button works as expected - it takes you to the previous
>>>> url.
>>>>
>>>> Sven
>>>>
>>>>
>>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
>>>>> Main page which is mounted with mountBookmarkablePage. For some reason
>>>>> the Back button in the browser  does not take the user to the
>>>>> previously selected tab. It takes them out to the page which was shown
>>>>> before user saw Main page for the first time.
>>>>>
>>>>> Should I be expecting the Back button to work on AjaxTabbedPanel? If
>>>>> so, why wouldn't it be working?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Alec
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>

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



Re: Back button doesn't work with AjaxTabbedPanel

2012-08-30 Thread Alec Swan
Well, I have other ajax interactions and I thought if I could fix Back
button for AjaxTabbedPanel I'd be able to fix it for other ajax
interactions.

On Thu, Aug 30, 2012 at 12:51 PM, Sven Meier  wrote:
> Silly question: Why don't you use a non-Ajax Tabbedpanel?
>
> Sven
>
>
> On 08/30/2012 08:45 PM, Alec Swan wrote:
>>
>> What can I do to allow user to go back to the previously selected tab
>> with a Back button? I tried the following approach but it doesn't seem
>> to work:
>> http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jquery-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBackButton.java
>>
>> On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
>>>
>>> Swapping components via Ajax will not change the browser's page history.
>>> Thus the Back button works as expected - it takes you to the previous
>>> url.
>>>
>>> Sven
>>>
>>>
>>> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>>>
>>>> Hello,
>>>>
>>>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
>>>> Main page which is mounted with mountBookmarkablePage. For some reason
>>>> the Back button in the browser  does not take the user to the
>>>> previously selected tab. It takes them out to the page which was shown
>>>> before user saw Main page for the first time.
>>>>
>>>> Should I be expecting the Back button to work on AjaxTabbedPanel? If
>>>> so, why wouldn't it be working?
>>>>
>>>> Thanks,
>>>>
>>>> Alec
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: Back button doesn't work with AjaxTabbedPanel

2012-08-30 Thread Sven Meier

Silly question: Why don't you use a non-Ajax Tabbedpanel?

Sven

On 08/30/2012 08:45 PM, Alec Swan wrote:

What can I do to allow user to go back to the previously selected tab
with a Back button? I tried the following approach but it doesn't seem
to work: 
http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jquery-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBackButton.java

On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:

Swapping components via Ajax will not change the browser's page history.
Thus the Back button works as expected - it takes you to the previous url.

Sven


On 08/30/2012 07:55 PM, Alec Swan wrote:

Hello,

I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
Main page which is mounted with mountBookmarkablePage. For some reason
the Back button in the browser  does not take the user to the
previously selected tab. It takes them out to the page which was shown
before user saw Main page for the first time.

Should I be expecting the Back button to work on AjaxTabbedPanel? If
so, why wouldn't it be working?

Thanks,

Alec

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



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


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




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



Re: Back button doesn't work with AjaxTabbedPanel

2012-08-30 Thread Alec Swan
What can I do to allow user to go back to the previously selected tab
with a Back button? I tried the following approach but it doesn't seem
to work: 
http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jquery-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBackButton.java

On Thu, Aug 30, 2012 at 12:36 PM, Sven Meier  wrote:
> Swapping components via Ajax will not change the browser's page history.
> Thus the Back button works as expected - it takes you to the previous url.
>
> Sven
>
>
> On 08/30/2012 07:55 PM, Alec Swan wrote:
>>
>> Hello,
>>
>> I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
>> Main page which is mounted with mountBookmarkablePage. For some reason
>> the Back button in the browser  does not take the user to the
>> previously selected tab. It takes them out to the page which was shown
>> before user saw Main page for the first time.
>>
>> Should I be expecting the Back button to work on AjaxTabbedPanel? If
>> so, why wouldn't it be working?
>>
>> Thanks,
>>
>> Alec
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: Back button doesn't work with AjaxTabbedPanel

2012-08-30 Thread Sven Meier

Swapping components via Ajax will not change the browser's page history.
Thus the Back button works as expected - it takes you to the previous url.

Sven

On 08/30/2012 07:55 PM, Alec Swan wrote:

Hello,

I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
Main page which is mounted with mountBookmarkablePage. For some reason
the Back button in the browser  does not take the user to the
previously selected tab. It takes them out to the page which was shown
before user saw Main page for the first time.

Should I be expecting the Back button to work on AjaxTabbedPanel? If
so, why wouldn't it be working?

Thanks,

Alec

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




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



Back button doesn't work with AjaxTabbedPanel

2012-08-30 Thread Alec Swan
Hello,

I am using AjaxTabbedPanel to implement an ajax-swappable menu on the
Main page which is mounted with mountBookmarkablePage. For some reason
the Back button in the browser  does not take the user to the
previously selected tab. It takes them out to the page which was shown
before user saw Main page for the first time.

Should I be expecting the Back button to work on AjaxTabbedPanel? If
so, why wouldn't it be working?

Thanks,

Alec

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



Re: ajax and browser back button in wicket 6

2012-08-29 Thread Alec Swan
I found the following class which adds back button support to AJAX
components: 
http://grepcode.com/file/repo1.maven.org/maven2/org.wicketstuff/jquery-examples/1.4.7/org/wicketstuff/jquery/ajaxbackbutton/Page4AjaxBackButton.java

Is this the recommended solution for 1.4.x? What are other alternatives?

Thanks,

Alec

On Tue, Jul 24, 2012 at 8:37 AM, Martin Grigorov  wrote:
> Hi Steve,
>
> There is nothing new about this in Wicket 6.
> It is as in Wicket 1.5 - back button is not supported out of the box for Ajax.
>
> On Tue, Jul 24, 2012 at 4:48 PM, Steve Lowery
>  wrote:
>> I did a search in the user list and found several references of various
>> ways to solve the back button using ajax problem, but most were a few years
>> old.  I was wondering if wicket 6 does can do this out of the box now.  One
>> of the stated goals on the wicket site is that it will "Fully solve back
>> button problem".  Does this hold true for ajax requests or just plain http
>> requests (or both)?
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>

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



Re: ajax and browser back button in wicket 6

2012-07-24 Thread Martin Grigorov
Hi Steve,

There is nothing new about this in Wicket 6.
It is as in Wicket 1.5 - back button is not supported out of the box for Ajax.

On Tue, Jul 24, 2012 at 4:48 PM, Steve Lowery
 wrote:
> I did a search in the user list and found several references of various
> ways to solve the back button using ajax problem, but most were a few years
> old.  I was wondering if wicket 6 does can do this out of the box now.  One
> of the stated goals on the wicket site is that it will "Fully solve back
> button problem".  Does this hold true for ajax requests or just plain http
> requests (or both)?



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



ajax and browser back button in wicket 6

2012-07-24 Thread Steve Lowery
I did a search in the user list and found several references of various
ways to solve the back button using ajax problem, but most were a few years
old.  I was wondering if wicket 6 does can do this out of the box now.  One
of the stated goals on the wicket site is that it will "Fully solve back
button problem".  Does this hold true for ajax requests or just plain http
requests (or both)?


Re: Back button is troubling session management...

2012-06-10 Thread Martin Grigorov
On Sat, Jun 9, 2012 at 7:53 PM, kshitiz  wrote:
> I used the same logic in onBeforeRender and it is working...

Right!
Page constructor is executed only once.
Page#onConfigure/onBeforeRender() are executed for every rendering of
the page.

>
> --
> View this message in context: 
> http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649805.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Back button is troubling session management...

2012-06-09 Thread kshitiz
I used the same logic in onBeforeRender and it is working...

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649805.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Back button is troubling session management...

2012-06-09 Thread kshitiz
Hi, 

My code to check user session is:


if (UserSession.get().checkUserSession()) {
// redirecting user to home page
setResponsePage(Home.class, new 
PageParameters());
}

*   UserSession is*

public class UserSession extends WebSession {

/**
 * 
 */
private static final long serialVersionUID = 1L;

public UserSession(Request request) {
super(request);
// TODO Auto-generated constructor stub
}

private Object myObject;

// if you use java >= 1.5 you can make use of covariant return types
public static UserSession get() {
return (UserSession)Session.get();
}


public boolean checkUserSession()
{
if(myObject==null) return false;
else return true;
}

public void logout()
{
get().invalidate();
myObject = null;
}


public Object getMyObject() {
return myObject;
}


public void setMyObject(Object myObject) {
this.myObject = myObject;
}





}


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Re-Back-button-is-troubling-session-management-tp4649801p4649804.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Back button is troubling session management...

2012-06-09 Thread Andrea Del Bene

Hi,

where did you pu the logic to check if user has already signed in 
(onInitialize, onBeforeRender, etc...)? Could you show your code?

Hi,

After I log in that application, I am not suppose to see login page of the
app when I press back button. Though I am not able to go to login url as I
am checking user session in login page and redirects him to home page if the
session is present. But, when back button is pressed, that logic is skipped
and login pageis displayed. How to handle this issue? How can I reload login
page after pressing back button?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Back-button-is-troubling-session-management-tp4649793.html
Sent from the Users forum mailing list archive at Nabble.com.

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




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



Back button is troubling session management...

2012-06-09 Thread kshitiz
Hi,

After I log in that application, I am not suppose to see login page of the
app when I press back button. Though I am not able to go to login url as I
am checking user session in login page and redirects him to home page if the
session is present. But, when back button is pressed, that logic is skipped
and login pageis displayed. How to handle this issue? How can I reload login
page after pressing back button?

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Back-button-is-troubling-session-management-tp4649793.html
Sent from the Users forum mailing list archive at Nabble.com.

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



RE: How to skip a page on back button

2012-03-01 Thread Wilhelmsen Tor Iver
> Is there any way to skip a page using back button. i.e.

> Forward sequence: HomePage->Page1->Page2

If the link from Page1 to Page2 is a Javascript link that does a 
location.replace('url for Page2') the browser should not remember Page1 in the 
history, if memory serves. Removing from the PageMap is probably something you 
need to handle as a consequence of the link though.

- Tor Iver

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



How to skip a page on back button

2012-03-01 Thread pmaks
Hi All,
 Is there any way to skip a page using back button. i.e.

Forward sequence: HomePage->Page1->Page2

*using browser back button*
Current Reverse sequence: Page2->Page1->HomePage 
Desired Reverse sequence: *Page2->HomePage* 

I've tried "this.getPageMap().remove(this);" in Page1 constructor, but it is
not working.

Any idea..?

I'm using Wicket 1.4.19

Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-skip-a-page-on-back-button-tp4434470p4434470.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Back button showing a page with stale data

2011-12-25 Thread robert.mcguinness
1. use LDM or AbstractReadOnlyModel to load your data on PageA.  i use LDMs
to load almost all data and about the only time I don't use an LDM is during
a wizard scenario, where the same object needs to be updated across request.  

2. disable caching of the page so that the server is requested when the user
hits the back button.  on PageA, override onBeforeRender and put a
breakpoint in it to make sure the page is getting called when you hit the
back button.  Wicket 1.4 and Wicket 1.5 have different ways of doing, but
here is an example in Wicket 1.4 about what I'm referring to: 
http://www.richardnichols.net/2010/03/apache-wicket-force-page-reload-to-fix-ajax-back/

Rob

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Back-button-showing-a-page-with-stale-data-tp4233580p4233747.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Back button showing a page with stale data

2011-12-25 Thread Chris Colman
Let's say I have two pages A and B and both show a table with a 'state'
column.
 
Further, let's say that the user visits page A and then page B. On page
B they select an item in the table, bring up a modal form and change the
'state' field to something else and press OK. On page B a 'window
closed' event listener updates the table to show the new value of
'state' for the edited item.
 
Now if the user presses the 'Back' button on the browser to go back to
page A it displays the data as it was before with the old 'state' value
which is incorrect.
 
Is there a best practice or standard way to deal with this in Wicket so
that when the user presses 'Back' they only see fresh data and not stale
data? Do we need to intercept the browser's back button mechanics via
JavaScript to force a refresh of the data before the table is displayed?
 
Yours sincerely,
 
Chris Colman
 
Pagebloom Team Leader,
Step Ahead Software

 
pagebloom - your business & your website growing together
 
Sydney: (+61 2) 9656 1278 Canberra: (+61 2) 6100 2120 
Email: chr...@stepahead.com.au <mailto://chr...@stepahead.com.au> 
Website:
http://www.pagebloom.com http://www.pagebloom.com/> 
http://develop.stepaheadsoftware.com
http://develop.stepaheadsoftware.com/> 
 
 


Re: Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-08 Thread Robin Shine
I will use modelChanged() as you suggested. Thanks for the community, my 
question always get answered very quickly, :D

In case you are interested, here is another wicket powered product: QuickBuild, 
a continuous integration and release management server. Initially I 
chose Tapestry for the UI layer. Starting from QuickBuild 2.0, I 
switched to Wicket since it is very easy to contribute web UI via 
plugins due to the fact that Wicket page can be dynamically composed. 

Regards
Robin



 From: Martin Grigorov 
To: users@wicket.apache.org 
Sent: Thursday, December 8, 2011 7:31 PM
Subject: Re: Back button not work in Wicket 1.5.3 when component structure is 
not changed
 
Actually the important method is modelChanging(). It calls #dirty() for you.
In the code below there is no change in the state managed by Wicket (a
change in a model with setDefaultModel[Object]()) and that's the
reason the request doesn't trigger new page version.

On Thu, Dec 8, 2011 at 12:27 PM, James Carman
 wrote:
> modelChanged()?
>
> Sent from tablet device.  Please excuse typos and brevity.
> On Dec 8, 2011 12:58 AM, "Dan Retzlaff"  wrote:
>
>> Hi, Robin. I am not a core developer, but I believe this is as designed. If
>> you want the page version to be incremented, you can call Page#dirty() in
>> your onClick(). Otherwise the page version only advances when the component
>> hierarchy changes or when a component's model changes.
>>
>> On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine  wrote:
>>
>> > Hi All,
>> >
>> >
>> > In Wicket 1.5.3, I create a very simple page containing a label and a
>> > link, when the link is clicked, it increases a counter, and change model
>> > value of the label. Thus the counter on the page will increase each time
>> > the link is clicked. For instance, the initial value displayed is 0, and
>> > after three clicks, the page displays value 3. However, the url remains
>> > unchanged while clicking the link, and hitting a back button at this time
>> > will display the page before displaying value 0, instead of displaying
>> > value 2.
>> >
>> >
>> > Is this a designed behavior or a bug? The page java code and its template
>> > is like below:
>> >
>> >
>> > TestPage.java:
>> >
>> > public class MyPage extends WebPage {
>> >
>> >     private int count;
>> >     protected void onInitialize() {
>> >         super.onInitialize();
>> >         add(new Link("link") {
>> >             public void onClick() {
>> >                 count++;
>> >             }
>> >         });
>> >         add(new Label("label", new AbstractReadOnlyModel() {
>> >             public String getObject() {
>> >                 return String.valueOf(count);
>> >             }
>> >         }));
>> >     }
>> > }
>> >
>> > TestPage.html:
>> >
>> > link
>> > label
>> >
>> >
>> > Thanks for your help.
>> >
>> > Robin
>> >
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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

Re: Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-08 Thread Martin Grigorov
Actually the important method is modelChanging(). It calls #dirty() for you.
In the code below there is no change in the state managed by Wicket (a
change in a model with setDefaultModel[Object]()) and that's the
reason the request doesn't trigger new page version.

On Thu, Dec 8, 2011 at 12:27 PM, James Carman
 wrote:
> modelChanged()?
>
> Sent from tablet device.  Please excuse typos and brevity.
> On Dec 8, 2011 12:58 AM, "Dan Retzlaff"  wrote:
>
>> Hi, Robin. I am not a core developer, but I believe this is as designed. If
>> you want the page version to be incremented, you can call Page#dirty() in
>> your onClick(). Otherwise the page version only advances when the component
>> hierarchy changes or when a component's model changes.
>>
>> On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine  wrote:
>>
>> > Hi All,
>> >
>> >
>> > In Wicket 1.5.3, I create a very simple page containing a label and a
>> > link, when the link is clicked, it increases a counter, and change model
>> > value of the label. Thus the counter on the page will increase each time
>> > the link is clicked. For instance, the initial value displayed is 0, and
>> > after three clicks, the page displays value 3. However, the url remains
>> > unchanged while clicking the link, and hitting a back button at this time
>> > will display the page before displaying value 0, instead of displaying
>> > value 2.
>> >
>> >
>> > Is this a designed behavior or a bug? The page java code and its template
>> > is like below:
>> >
>> >
>> > TestPage.java:
>> >
>> > public class MyPage extends WebPage {
>> >
>> >     private int count;
>> >     protected void onInitialize() {
>> >         super.onInitialize();
>> >         add(new Link("link") {
>> >             public void onClick() {
>> >                 count++;
>> >             }
>> >         });
>> >         add(new Label("label", new AbstractReadOnlyModel() {
>> >             public String getObject() {
>> >                 return String.valueOf(count);
>> >             }
>> >         }));
>> >     }
>> > }
>> >
>> > TestPage.html:
>> >
>> > link
>> > label
>> >
>> >
>> > Thanks for your help.
>> >
>> > Robin
>> >
>>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-08 Thread James Carman
modelChanged()?

Sent from tablet device.  Please excuse typos and brevity.
On Dec 8, 2011 12:58 AM, "Dan Retzlaff"  wrote:

> Hi, Robin. I am not a core developer, but I believe this is as designed. If
> you want the page version to be incremented, you can call Page#dirty() in
> your onClick(). Otherwise the page version only advances when the component
> hierarchy changes or when a component's model changes.
>
> On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine  wrote:
>
> > Hi All,
> >
> >
> > In Wicket 1.5.3, I create a very simple page containing a label and a
> > link, when the link is clicked, it increases a counter, and change model
> > value of the label. Thus the counter on the page will increase each time
> > the link is clicked. For instance, the initial value displayed is 0, and
> > after three clicks, the page displays value 3. However, the url remains
> > unchanged while clicking the link, and hitting a back button at this time
> > will display the page before displaying value 0, instead of displaying
> > value 2.
> >
> >
> > Is this a designed behavior or a bug? The page java code and its template
> > is like below:
> >
> >
> > TestPage.java:
> >
> > public class MyPage extends WebPage {
> >
> > private int count;
> > protected void onInitialize() {
> > super.onInitialize();
> > add(new Link("link") {
> > public void onClick() {
> > count++;
> > }
> > });
> > add(new Label("label", new AbstractReadOnlyModel() {
> > public String getObject() {
> > return String.valueOf(count);
> > }
> > }));
> > }
> > }
> >
> > TestPage.html:
> >
> > link
> > label
> >
> >
> > Thanks for your help.
> >
> > Robin
> >
>


Re: Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-07 Thread Robin Shine
Hi Dan, 


Thanks for the quick response. The dirty() method does make the back button 
work again. 

Regards
Robin




 From: Dan Retzlaff 
To: users@wicket.apache.org; Robin Shine  
Sent: Thursday, December 8, 2011 1:57 PM
Subject: Re: Back button not work in Wicket 1.5.3 when component structure is 
not changed
 
Hi, Robin. I am not a core developer, but I believe this is as designed. If
you want the page version to be incremented, you can call Page#dirty() in
your onClick(). Otherwise the page version only advances when the component
hierarchy changes or when a component's model changes.

On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine  wrote:

> Hi All,
>
>
> In Wicket 1.5.3, I create a very simple page containing a label and a
> link, when the link is clicked, it increases a counter, and change model
> value of the label. Thus the counter on the page will increase each time
> the link is clicked. For instance, the initial value displayed is 0, and
> after three clicks, the page displays value 3. However, the url remains
> unchanged while clicking the link, and hitting a back button at this time
> will display the page before displaying value 0, instead of displaying
> value 2.
>
>
> Is this a designed behavior or a bug? The page java code and its template
> is like below:
>
>
> TestPage.java:
>
> public class MyPage extends WebPage {
>
>     private int count;
>     protected void onInitialize() {
>         super.onInitialize();
>         add(new Link("link") {
>             public void onClick() {
>                 count++;
>             }
>         });
>         add(new Label("label", new AbstractReadOnlyModel() {
>             public String getObject() {
>                 return String.valueOf(count);
>             }
>         }));
>     }
> }
>
> TestPage.html:
>
> link
> label
>
>
> Thanks for your help.
>
> Robin
>

Re: Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-07 Thread Dan Retzlaff
Hi, Robin. I am not a core developer, but I believe this is as designed. If
you want the page version to be incremented, you can call Page#dirty() in
your onClick(). Otherwise the page version only advances when the component
hierarchy changes or when a component's model changes.

On Wed, Dec 7, 2011 at 8:24 PM, Robin Shine  wrote:

> Hi All,
>
>
> In Wicket 1.5.3, I create a very simple page containing a label and a
> link, when the link is clicked, it increases a counter, and change model
> value of the label. Thus the counter on the page will increase each time
> the link is clicked. For instance, the initial value displayed is 0, and
> after three clicks, the page displays value 3. However, the url remains
> unchanged while clicking the link, and hitting a back button at this time
> will display the page before displaying value 0, instead of displaying
> value 2.
>
>
> Is this a designed behavior or a bug? The page java code and its template
> is like below:
>
>
> TestPage.java:
>
> public class MyPage extends WebPage {
>
> private int count;
> protected void onInitialize() {
> super.onInitialize();
> add(new Link("link") {
> public void onClick() {
> count++;
> }
> });
> add(new Label("label", new AbstractReadOnlyModel() {
> public String getObject() {
> return String.valueOf(count);
> }
> }));
> }
> }
>
> TestPage.html:
>
> link
> label
>
>
> Thanks for your help.
>
> Robin
>


Back button not work in Wicket 1.5.3 when component structure is not changed

2011-12-07 Thread Robin Shine
Hi All, 


In Wicket 1.5.3, I create a very simple page containing a label and a link, 
when the link is clicked, it increases a counter, and change model value of the 
label. Thus the counter on the page will increase each time the link is 
clicked. For instance, the initial value displayed is 0, and after three 
clicks, the page displays value 3. However, the url remains unchanged while 
clicking the link, and hitting a back button at this time will display the page 
before displaying value 0, instead of displaying value 2. 


Is this a designed behavior or a bug? The page java code and its template is 
like below:


TestPage.java:

public class MyPage extends WebPage {

    private int count;    
    protected void onInitialize() {
        super.onInitialize();
        add(new Link("link") {
            public void onClick() {
                count++;
            }            
        });
        add(new Label("label", new AbstractReadOnlyModel() {
            public String getObject() {
                return String.valueOf(count);
            }            
        }));
    }
}

TestPage.html:

link
label


Thanks for your help. 

Robin


Re: Multi-tabs and back-button support 1.5.2

2011-10-28 Thread Charlie Midtlyng
I have now created an issue on jira with the actual problems described above.
 
https://issues.apache.org/jira/browse/WICKET-4182
https://issues.apache.org/jira/browse/WICKET-4182 

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3947091.html
Sent from the Users forum mailing list archive at Nabble.com.

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



Re: Multi-tabs and back-button support 1.5.2

2011-10-27 Thread Martin Grigorov
On Thu, Oct 27, 2011 at 5:53 PM, Igor Vaynberg  wrote:
> no, not necessarily ajax. simple links that instead of navigating to a
> different page do panel replacement.

ok

I think back button should not be harmed by the stale check.

@Charlie: can you create a quickstart, attach it to a ticket and
describe the steps ?
Thanks!

>
> -igor
>
> On Thu, Oct 27, 2011 at 8:51 AM, Martin Grigorov  wrote:
>> On Thu, Oct 27, 2011 at 5:48 PM, Igor Vaynberg  
>> wrote:
>>> hrm. i dont think the rendercount should prevent me from using the
>>> page. if i write my application as a single page then our back button
>>> support is completely hosed. i should be able to back button and
>>> re-submit the form.
>>
>> As single page - i.e. completely Ajax navigation ?
>> In this case back button support is on your own.
>>
>> Do you suggest to remove the check for stale page ?
>>
>>>
>>> -igor
>>>
>>> On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov  
>>> wrote:
>>>> The only option is see is to make the check for stale page
>>>> configurable via IPageSettings for example.
>>>>
>>>> On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng
>>>>  wrote:
>>>>> I would actually like to accept the data from both tabs as long as they 
>>>>> are
>>>>> valid.
>>>>> The same effect should be available on back-button and changing values.
>>>>>
>>>>> --
>>>>> View this message in context: 
>>>>> http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html
>>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>>
>>>>> -
>>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Martin Grigorov
>>>> jWeekend
>>>> Training, Consulting, Development
>>>> http://jWeekend.com
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>>
>>
>> --
>> Martin Grigorov
>> jWeekend
>> Training, Consulting, Development
>> http://jWeekend.com
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>



-- 
Martin Grigorov
jWeekend
Training, Consulting, Development
http://jWeekend.com

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



Re: Multi-tabs and back-button support 1.5.2

2011-10-27 Thread Igor Vaynberg
no, not necessarily ajax. simple links that instead of navigating to a
different page do panel replacement.

-igor

On Thu, Oct 27, 2011 at 8:51 AM, Martin Grigorov  wrote:
> On Thu, Oct 27, 2011 at 5:48 PM, Igor Vaynberg  
> wrote:
>> hrm. i dont think the rendercount should prevent me from using the
>> page. if i write my application as a single page then our back button
>> support is completely hosed. i should be able to back button and
>> re-submit the form.
>
> As single page - i.e. completely Ajax navigation ?
> In this case back button support is on your own.
>
> Do you suggest to remove the check for stale page ?
>
>>
>> -igor
>>
>> On Thu, Oct 27, 2011 at 3:20 AM, Martin Grigorov  
>> wrote:
>>> The only option is see is to make the check for stale page
>>> configurable via IPageSettings for example.
>>>
>>> On Thu, Oct 27, 2011 at 12:16 PM, Charlie Midtlyng
>>>  wrote:
>>>> I would actually like to accept the data from both tabs as long as they are
>>>> valid.
>>>> The same effect should be available on back-button and changing values.
>>>>
>>>> --
>>>> View this message in context: 
>>>> http://apache-wicket.1842946.n4.nabble.com/Multi-tabs-and-back-button-support-1-5-2-tp3943445p3943856.html
>>>> Sent from the Users forum mailing list archive at Nabble.com.
>>>>
>>>> -
>>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Martin Grigorov
>>> jWeekend
>>> Training, Consulting, Development
>>> http://jWeekend.com
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>>> For additional commands, e-mail: users-h...@wicket.apache.org
>>>
>>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
>> For additional commands, e-mail: users-h...@wicket.apache.org
>>
>>
>
>
>
> --
> Martin Grigorov
> jWeekend
> Training, Consulting, Development
> http://jWeekend.com
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

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



  1   2   3   4   5   >