You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by rektide <re...@gmail.com> on 2008/12/19 00:52:53 UTC
h:selectOneMenu
HTML 4.01 says of the size attribute of the SELECT tag, Section 17.6, [
http://www.w3.org/TR/html401/interact/forms.html#h-17.6 ],
*size = <http://www.w3.org/TR/html401/types.html#type-number>*number* [CN]
**If a SELECT <http://www.w3.org/TR/html401/interact/forms.html#edef-SELECT>element
is presented as a scrolled list box, this attribute specifies the
number of rows in the list that should be visible at the same time. Visual
user agents are not required to present a SELECT element as a list box; they
may use any other mechanism, such as a drop-down menu**.
*
The problem is, some user agents such as Firefox 3 display any SELECT with a
size as a list box. This is a problem because according to the tag
reference for h:selectOneMenu [
http://www.w3.org/TR/html401/interact/forms.html#h-17.6 ],
*The SelectOneMenu tag renders an HTML "select" element with a "size" of 1
without the "multiple" attribute. This component is designed for situations
where you want to display a single-select list of options to the user in a
menu that displays one item at a time.*
So it is impossible to create a SELECT tag without a SIZE element in JSF.
Thus, it is impossible to create a drop down list / combo-box in HTML via
JSF on Firefox 3. I know of no work-arounds to coax out a combo/ drop down
behavior out of a h:selectOneMenu. I believe this is a defect in the JSF
spec, and I would appreciate any workarounds anyone could offer.
Re: h:selectOneMenu
Posted by rektide <re...@gmail.com>.
I've exhausted my ideas for using DOM manipulation to alter the state of the
checkbox. See Bugzilla defect
https://bugzilla.mozilla.org/show_bug.cgi?id=470341 .
Based off this Firefox defect, I believe the only way to get a combobox /
menubox is to prevent JSF from rendering the size="1" attribute altogether.
Theres no reason for it to be rendered in the first place.