myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Kienenberger <mkien...@gmail.com>
Subject Re: Help! How to set focus on a form?
Date Thu, 20 Oct 2005 16:10:52 GMT
If you provide a patch, it'll be more likely to end up in t:form sooner  :)

Your best bet is to send an email to jsr-252-comments@jcp.org if you'd
like to see it in a future version of JSF's h:form.

-Mike

On 10/20/05, CONNER, BRENDAN (SBCSI) <bc1378@sbc.com> wrote:
> FYI: I checked into how Struts renders <html:form focus="fieldName"
> ...>, and it simply adds the following lines after the end of the form:
>
> <script language="JavaScript" type="text/javascript">
>   <!--
>
> document.forms["viewName:formName"].elements["viewName:formName:fieldNam
> e"].focus();
>   // -->
> </script>
>
> Is that something we can build into a <t:form> component?  Does anyone
> know whether something like this will be in the next standard for
> <h:form>?
>
> I'll submit a JIRA suggested enhancement for this, since I believe it
> could be quite useful.
>
> - Brendan
>
> >  -----Original Message-----
> > From:         CONNER, BRENDAN (SBCSI)
> > Sent: Thursday, October 20, 2005 10:03 AM
> > To:   'MyFaces Discussion'
> > Subject:      Help!  How to set focus on a form?
> >
> > Under Struts, one could do the following: <html:form ....
> > focus="fieldName"> to specify which field within a form should receive
> > focus upon loading the form.  How can I do this under JSF?
> >
> > - Brendan
>

Mime
View raw message