Re: Under certain circumstances, prevent the replacement of markup after a successful Ajax response

2020-10-20 Thread Sven Meier

Hi,

from the JavaDoc:

    /**
     * Indicates whether or not this AjaxBehavior will produce 
. By default it will
     * produce it but some behaviors may need to return their own 
response which shouldn't be

     * processed by wicket-ajax.js
     */
    private boolean wicketAjaxResponse = true;

So with wicketAjaxResponse = false (attrs.wr = false) you can specify 
that your code wants to handle the Ajax response instead of Wicket's 
default handling (i.e. changing the DOM).


>My goal is to prevent the ajax component replacement in some 
circumstances.
>The circumstances could be changed during the delay between request 
and response.


I don't see a solution how you could change .wr dynamically, since no 
event is published before handling of the Ajax response.


What's your use-case?

Have fun
Sven


On 20.10.20 17:57, Holzmueller wrote:

Hi everyone,

I've a question about the wicket ajax response processing.
What's the meaning behind the attrs.wr JavaScript boolean attribute?

I can change it with JavaScript by the IAjaxCallListener.getBeforeSendHandler() 
method.

My goal is to prevent the ajax component replacement in some circumstances.

The IAjaxCallListener.getPrecondition() is to early. The circumstances could be 
changed during the delay between request and response.

Thanks for any help.


-
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



Under certain circumstances, prevent the replacement of markup after a successful Ajax response

2020-10-20 Thread Holzmueller
Hi everyone,

I've a question about the wicket ajax response processing.
What's the meaning behind the attrs.wr JavaScript boolean attribute?

I can change it with JavaScript by the IAjaxCallListener.getBeforeSendHandler() 
method.

My goal is to prevent the ajax component replacement in some circumstances.

The IAjaxCallListener.getPrecondition() is to early. The circumstances could be 
changed during the delay between request and response.

Thanks for any help.


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



Re: Display custom page automatically on session expiry without any action

2020-10-20 Thread Arunachalam Sibisakkaravarthi
We just followed the project you shared
https://github.com/reiern70/antilia-bits/tree/master/client-sign-out-parent


*Thanks And RegardsSibi.ArunachalammCruncher*


On Tue, Sep 29, 2020 at 3:32 PM Ernesto Reinaldo Barreiro <
reier...@gmail.com> wrote:

> Good to know. Can you share a bit more info regarding what you finally did?
> This might help other wicket users ;-)
>
> On Tue, Sep 29, 2020 at 4:11 AM Arunachalam Sibisakkaravarthi <
> arunacha...@mcruncher.com> wrote:
>
> > Thanks guys, your suggestions helped us.
> >
> >
> >
> > *Thanks And RegardsSibi.ArunachalammCruncher*
> >
> >
> > On Thu, Sep 24, 2020 at 3:57 PM Ernesto Reinaldo Barreiro <
> > reier...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > Glad it helped. After I sent my last message, I was thinking again
> about
> > > this problem and I believe another possibility is to use web-sockets
> and
> > > some server side logic that just notifies the browser sending a
> redirect
> > to
> > > a "session expired page". This might be more reliable than some client
> > side
> > > logic (as far as I remember there was some trickery to account for the
> > fact
> > > that inactive tabs on browsers are put on "the background").
> > >
> > > On Thu, Sep 24, 2020 at 7:16 AM Vignesh Palanisamy <
> > vign...@mcruncher.com>
> > > wrote:
> > >
> > > > Hi Ernesto,
> > > >
> > > > Thanks, It helps a lot. it would be good if we had it with
> wicketstuff.
> > > >
> > > > Thanks & Regards
> > > > Vignesh Palanisamy
> > > >
> > > >
> > > > On Sat, Sep 12, 2020 at 8:42 PM Ernesto Reinaldo Barreiro <
> > > > reier...@gmail.com> wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > >
> > > >
> > >
> >
> https://github.com/reiern70/antilia-bits/tree/master/client-sign-out-parent
> > > > >
> > > > > Not sure what is the status of this project but I think use case
> was
> > > > > similar tro what you mention
> > > > >
> > > > >
> > > > > On Fri, Sep 11, 2020 at 4:55 AM Arunachalam Sibisakkaravarthi <
> > > > > arunacha...@mcruncher.com> wrote:
> > > > >
> > > > > > Hi guys,
> > > > > > When session expires, user is redirected to a page set by
> > > > > > getApplicationSettings().setPageExpiredErrorPage(SomePage.class)
> on
> > > his
> > > > > > next action.
> > > > > > But I want to display a page automatically without his next
> action.
> > > > > > So that last rendered page will not be displayed after session
> > expiry
> > > > > like
> > > > > > banking sites.
> > > > > > How do I achieve this?
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > *Thanks And RegardsSibi.ArunachalammCruncher*
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Regards - Ernesto Reinaldo Barreiro
> > > > >
> > > >
> > >
> > >
> > > --
> > > Regards - Ernesto Reinaldo Barreiro
> > >
> >
>
>
> --
> Regards - Ernesto Reinaldo Barreiro
>