This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
I have form at the bottom of the page, I don't want user after pressing "Enter" scroll all the way down to the bottom to see errors/correct input. Is there way to specify somehow fragment in URL, like "#someFormId".
It's possible to specify it for a <h:link> with "fragment" attribute, but I couldn't find anything on form's, form's commandButtons or wherever.
Nobody has forms anywhere except top of the page?
Joined: Apr 13, 2011
One more related thing, is:
Suppose we have some kind of "quick" form, which popups or at some corner of the page, if user fills in some data and press submit button, then whenever error raised he would be redirected to "dedicated" page for this form, with all the errors shown there.
Is it possible ?
If you use AJAX to process the form, the page can update in place, so the user can be scrolled anywhere without having the browser jump to the top of the page.
For a non-AJAX approach it probably is better to just put the form on its own page, at the top of the page.
Actual use of the HTML "#" anchor indicator in JSF doesn't work, because JSF uses it internally.
I do have some pop-up dialogs done with RichFaces, and since they use the JSF error message facility, when the popup goes away, the error is visible in the error display on the page that hosts the dialog box.
Having said all that, I should remark that one of the advantages of JSF is that it makes it easy to put error messages close to the input controls that have the errors in them, so scrolling and such over messages isn't really all that important.
Customer surveys are for companies who didn't pay proper attention to begin with.