Ted Husted wrote:

> Ted Husted wrote:
> > another way to do this would be by changing the form's focus to the
> "first" invalid field. ... Not that I know how you would actually do
> that ...
>
> On 12/19/2000 at 12:45 AM Geoffrey Simmons wrote:
> > You can do that with Javascript, and I'm relatively certain that it's
> the only way.
>
> I just had a vague idea about getting Struts to write the Javascript by
> somehow changing the focus property for the form tag. Which is the part
> I'm not sure about.
>

One approach might be to use a runtime expression as the value of the "focus"
attribute.  Then, your action could set some appropriate request attribute to
the name of the field to be focused on, and your expression could pick up the
value.

At least with the most recent nightly 1.0 builds, all of the custom tags take
runtime expressions for all attributes.

>
> -- Ted Husted, Husted dot Com, Fairport NY USA.
> -- Custom Software ~ Technical Services.
> -- Tel 716 425-0252; Fax 716 223-2506.
> -- http://www.husted.com/

Craig


Reply via email to