I just recently created a form in Tapestry 4 in a way that the first input control in my form is a submit button and not an input field. What happens now is that the submit button is always in focus when the page is loaded. It becomes a bit unpleasant since the user will most likely want to enter text when the page is loaded. (In IE for windows it's particularly unpleasant since the button is not only in focus but the button's text appears to be selected making it look a very strange)
In the docs and it says that: "Priority is given to fields in error, then required fields, then any non-disabled field." Though I like the focus support in Tapestry forms, I'd like to suggest that it could be a little bit different due to this particular problem. In my case, I do have text input fields in the form that are required. First of all my question is this. Are submit buttons necessarily considered required? Or what determines if a field is required (I'm using "validators='validators:required'")? Now suppose none of my text input fields were required. Wouldn't it be more interesting if the focus went directly to a text input field instead? I would like to suggest the developers to do it something like: Priority is given to fields in error, then required fields, then any non-disabled text field, then any other input control (such as buttons, etc.). Any thoughts? Denis Souza