Originally posted by Gregg Bolinger:
I noticed that if I have an inputText control and a commandButton, hitting enter on the textfield just does a postback, whereas, on a non JSF driven page, hitting enter just submits the default button on the page.
Does this mean that I must also supply a listener on the inputText control that calls the same method in my bean as the commandButton?
Gregg,
I'm not quite sure what you mean -- hitting enter on a JSF form usually defaults to the first button, like any other HTML form. Let's say you had a navigation rule like this:
And you have a page like this:
If you hit enter, it'll execute the "default" button, and try to load "anotherpage.jsp". If you click on the "not default" button, it'll simply redisplay the page.