An addition / alternative: provide a Javascript hooks for pages to perform arbitrary actions (e.g. focusing the first input field) when:

(1) form was just requested, not submitted;
(2) fields are in error;
(3) no fields are in error

...or something along those lines.

On Aug 29, 2005, at 3:15 PM, Denis Souza wrote:

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






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to