Is there way, to keep the page coordinates in JSF? I have a lengthy page, and it is very annoying, that when the user submits something, the page goes to the top.
When you submit a request, the page that comes back could be totally different than the page that did the submitting, so the old "page coordinate" wouldn't be valid. Since the client doesn't know what the server may do, it doesn't even try.
There are 2 ways around this.
1. Use the HTML anchor tag. If you append a "#name" to the end of a URL (before the query part), that tells the browser to position the displayed page to the named "<a> element. This is hard to do in JSF, because JSF has mostly taken over the URL structure.
2. Use AJAX. If you use AJAX, you don't request a new page, just data that will be used to update the current page. So the browser doesn't lose track of where you were positioned. If you delete the "current position", the browser will simply reposition to someplace reasonably close.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.