JSF2: Submit AJAX form

I have a page that has a table list through AJAX pagination, all custom. Pagination is working properly, but the Enter key clears the form input’s values instead of submitting. My submit button makes …

Making AJAX calls secure

What happens if a user looks at my JavaScript file, copies the content of a function and sends a request to my server using AJAX? And is there a way to properly protect against this from happening?