dev@javaserverfaces.java.net

RE: Please review changebundle for focus tag

From: Kito D. Mann <kmann_at_virtua.com>
Date: Tue, 8 Apr 2008 13:07:50 -0400

Ryan,

Can we ensure that idea is tracked in the spec issue tracker, at least? I
agree with you that it should be in the spec.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Kito D. Mann - Author, JavaServer Faces in Action
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
phone: +1 203-653-2989
fax: +1 203-653-2988


> -----Original Message-----
> From: Ryan.Lubke_at_Sun.COM [mailto:Ryan.Lubke_at_Sun.COM]
> Sent: Tuesday, April 08, 2008 12:53 PM
> To: dev_at_javaserverfaces.dev.java.net
> Subject: Re: Please review changebundle for focus tag
>
> Jim Driscoll wrote:
> > This is the tag that we were talking about on the list. This is the
> > simple version, you just use <mj:focus for="componetID"/>. Added it
> > as part of the Mojarra Extensions library.
> >
> > I'd still like to see it as an attribute on f:view for 2.0.
> >
> > SECTION: Modified Files
> > ----------------------------
> >
> > M jsf-ri/conf/share/mojarra_ext.tld
> > M jsf-ri/src/com/sun/faces/jsf-ri-config.xml
> > - Config changes to add focus tag. "for" attribute is required.
> >
> > A jsf-ri/src/com/sun/faces/ext/component/UIFocus.java
> > - UIComponent which extends UIComponentBase
> Any reason not to have a separate renderer for this?
> It may be useful to be able to override the rendering
> behavior as needed.
>
> >
> > A jsf-ri/src/com/sun/faces/ext/taglib/FocusTag.java
> > - Tag class for new Focus component.
> >
> > M jsf-demo/mojarra_ext/web/landing.jsp
> > M jsf-demo/mojarra_ext/web/welcome.jsp
> > - Update demo to use new focus tag.
> >
> >
> >
> > SECTION: Diffs
> > ----------------------------
> > Index: jsf-demo/mojarra_ext/web/landing.jsp
> > ===================================================================
> > RCS file:
> > /cvs/javaserverfaces-sources/jsf-demo/mojarra_ext/web/landing.jsp,v
> > retrieving revision 1.1.2.2
> > diff -u -r1.1.2.2 landing.jsp
> > --- jsf-demo/mojarra_ext/web/landing.jsp 7 Apr 2008 17:55:23
> > -0000 1.1.2.2
> > +++ jsf-demo/mojarra_ext/web/landing.jsp 8 Apr 2008 01:35:56 -0000
> > @@ -61,6 +61,7 @@
> > <h:message id="creditcardError"
> for="sampleCreditCard"/>
> > <br/>
> > <h:commandButton id="submit" action="back"
> > value="Back" />
> > + <mj:focus for="sampleCreditCard"/>
> > </h:form>
> > </f:view>
> >
> > Index: jsf-demo/mojarra_ext/web/welcome.jsp
> > ===================================================================
> > RCS file:
> > /cvs/javaserverfaces-sources/jsf-demo/mojarra_ext/web/welcome.jsp,v
> > retrieving revision 1.1.2.2
> > diff -u -r1.1.2.2 welcome.jsp
> > --- jsf-demo/mojarra_ext/web/welcome.jsp 7 Apr 2008 17:55:23
> > -0000 1.1.2.2
> > +++ jsf-demo/mojarra_ext/web/welcome.jsp 8 Apr 2008 01:35:56 -0000
> > @@ -61,6 +61,7 @@
> > </h:inputText>
> > <h:message id="regexError" for="sampleRegex"
> > showDetail="true" showSummary="false"/><br/>
> > <h:commandButton id="submit" action="landing"
> > value="Go" />
> > + <mj:focus for="sampleRegex"/>
> > </h:form>
> > </f:view>
> > </body>
> > Index: jsf-ri/conf/share/mojarra_ext.tld
> > ===================================================================
> > RCS file:
> > /cvs/javaserverfaces-sources/jsf-ri/conf/share/mojarra_ext.tld,v
> > retrieving revision 1.1.2.2
> > diff -u -r1.1.2.2 mojarra_ext.tld
> > --- jsf-ri/conf/share/mojarra_ext.tld 7 Apr 2008 17:55:23 -0000
> > 1.1.2.2
> > +++ jsf-ri/conf/share/mojarra_ext.tld 8 Apr 2008 01:35:56 -0000
> > @@ -75,4 +75,25 @@
> >
> > <tag-class>com.sun.faces.ext.taglib.CreditCardValidatorTag</tag-
> class>
> > <body-content>empty</body-content>
> > </tag>
> > + <tag>
> > + <name>focus</name>
> > + <tag-class>com.sun.faces.ext.taglib.FocusTag</tag-class>
> > + <attribute>
> > + <name>binding</name>
> > + <description>A value binding that points to a bean
> > property</description>
> > + </attribute>
> > + <attribute>
> > + <name>id</name>
> > + <description>The client id of this
> component</description>
> > + </attribute>
> > + <attribute>
> > + <name>rendered</name>
> > + <description>Is this component rendered?</description>
> > + </attribute>
> > + <attribute>
> > + <name>for</name>
> > + <description>component ID that should receive the
> > focus</description>
> > + <required>true</required>
> > + </attribute>
> > + </tag>
> > </taglib>
> > Index: jsf-ri/src/com/sun/faces/jsf-ri-config.xml
> > ===================================================================
> > RCS file:
> > /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/jsf-ri-
> config.xml,v
> > retrieving revision 1.73.4.2
> > diff -u -r1.73.4.2 jsf-ri-config.xml
> > --- jsf-ri/src/com/sun/faces/jsf-ri-config.xml 7 Apr 2008 17:55:22
> > -0000 1.73.4.2
> > +++ jsf-ri/src/com/sun/faces/jsf-ri-config.xml 8 Apr 2008 01:35:56
> > -0000
> > @@ -211,4 +211,9 @@
> >
> > <validator-
> class>com.sun.faces.ext.validator.CreditCardValidator</validator-class>
> >
> > </validator>
> >
> > + <!-- Add our implementation specific Components -->
> > + <component>
> > + <component-type>com.sun.faces.ext.focus</component-type>
> > + <component-class>com.sun.faces.ext.component.UIFocus</component-
> class>
> > + </component>
> > </faces-config>
> >
> >
> > SECTION: New Files
> > ----------------------------
> > SEE ATTACHMENTS
> > ---------------------------------------------------------------------
> ---
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> > For additional commands, e-mail: dev-
> help_at_javaserverfaces.dev.java.net
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
> For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net