Hi,
just go for a JavaScript solution, something like the 'Accept our cookies'
modal you see  the first time you visit a site. Wicket hook methods like
onInitialize are executed on server side so the can't directly trigger
JavaScript code.

On Sun, Sep 22, 2019, 3:42 PM Sibgha Nazir <sibgha...@gmail.com> wrote:

> Hi,
>
> Thanks But it calls the constructor every time the page is rendered. What I
> want is, once the user has seen that page before, I don't want to execute
> that logic again.
>
> I want to trigger a javascript function for the first time users. If I have
> seen the webpage once, the next time I open it, then that javascript must
> not trigger.
>
> Also, can I trigger the javascript in onInitialize() method and how?
>
> Best Regards,
> Sibgha
>
> On Sat, Sep 21, 2019 at 7:08 AM Martin Grigorov <mgrigo...@apache.org>
> wrote:
>
> > Hi,
> >
> > You can execute your logic in the page's constructor or onInitialize()
> > method.
> >
> > On Fri, Sep 20, 2019, 21:25 Sibgha Nazir <sibgha...@gmail.com> wrote:
> >
> > > Hi,
> > >
> > > I have a wicket application and I want to do something when the user
> > opens
> > > the webpage for the first time.
> > >
> > > Could anyone give me a clue on how to check if this is the first visit
> > on a
> > > certain webpage?
> > >
> > > Best Regards,
> > > Sibgha
> > >
> >
>

Reply via email to