I have a Java Web App. One of the pages contains a form with 3 checkboxes and a table.
Depending on which checkboxes are checked, different info gets populated in the table.
There is no submit button. The form is submitted whenever the user checks or unchecks one of the boxes.
Theoretically, I want the user to be able to uncheck all the boxes, which will result in the table being empty. However, if the user arrives at the page from another page, or upon initial visit to the app, I want them to have one of the boxes checked by default, and the respective data displayed in the table.
You could differentiate the request to the same page (submission) from the requests comming from other pages (or direct url access) by the HTTP method.
Make your form use a POST method and check if the request method is GET (direct access or link from another page) or POST (form submission).