Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to skip span elements while tabbing thru a JSF view's form

user9175643Feb 2 2010 — edited Feb 4 2010
I have a form in a xhtml file that while I tab thru the fields, the focus goes to a <span> element which is rendered from a custom JSF tag. This is an expand/collapse section header. I don't want the focus to stop there at all.

I have tried the following to no avail:

1) disabled="true"
2) tabindex="0"
3) tabindex="-1"
4) onfocus="this.blur();" <-- the onfocus event doesn't fire as this is rendered as a <span/> tag (not an input field)

None of these attempted solutions worked apparently b/c the <span> element is not an inputtable field. What is the best solution for this problem?

Must I dynamically set the tabindex attributes for all of the fields, thus bypassing the <span> elements? This is difficult to do with getter methods and counters in a backing bean as the getters are called X times throughout the JSF lifecycle.

thx.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 4 2010
Added on Feb 2 2010
7 comments
348 views