Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7869625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T01:23:05+00:00 2026-06-03T01:23:05+00:00

I am searching for a way to know when the user leaves the page

  • 0

I am searching for a way to know when the user leaves the page and has not saved the changes then show wicket’s modal(preferable but could be a confirmation box).

Additional info:
the solution should have minimal effects in code, because I have about 30 pages that will have the behavior, actually all my web pages extends from one called LayoutPage, something similar to this

I tried with pure JavaScript solution like in this question, but the application send a lot of data via AJAX requests, so I couldn’t determine a nice way to know if the data has been sent to the server

Ihen I start to look in the source code of the Form.class of Wicket. It has a nice method called isSubmitted(); I could use it if I was able to know from wicket if the user is about to quit the page.

I don’t want to write a validation for each page in the system.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T01:23:06+00:00Added an answer on June 3, 2026 at 1:23 am

    Simply generate your browser onbeforeunload using https://cwiki.apache.org/WICKET/calling-wicket-from-javascript.html. In the callback you can then check the state of your form or page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way to know if the user has clicked on an item
I am searching for a way to auto login a user when he validates
After searching Google I found one way to call a master page function from
I am searching for a way to close a Javascript pop-up/message box (i.e. not
I'm a NetBeans 6.5 user and am searching for a way of generating a
I'm searching a way to avoid systematic dynamic cast in the following problem. I
I'm searching a way to detect mouse and keyboards events in C# and read
i am searching a way to get Numerical gradient from the matrix. The same
You can get underground processes by ps ux I am searching a way to
I'm searching for a way to extract all text elements from a matplotlibfigure including

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.