JSF 2 multiple select dropdown box example
In JSF, <h:selectManyMenu /> tag is used to render a multiple select dropdown box – HTML select element with “multiple” and “size=1” attribute.
//JSF...
<h:selectManyMenu value="#{user.favCoffee1}">
<f:selectItem itemValue="Cream Latte" itemLabel="Coffee3 - Cream Latte" />
<f:selectItem itemValue="Extreme Mocha" itemLabel="Coffee3 - Extreme Mocha" />
<f:selectItem itemValue="Buena Vista" itemLabel="Coffee3 - Buena Vista" />
</h:selectManyMenu>
//HTML output...
<select name="j_idt6:j_idt8" multiple="multiple" size="1">
<option value="Cream Latte">Coffee3 - Cream Latte</option>
<option value="Extreme Mocha">Coffee3 - Extreme Mocha</option>
<option value="Buena Vista">Coffee3 - Buena Vista</option>
</select>
However, the use of h:selectManyMenu tag is highly NOT recommended, because they do not display consistently in different internet browsers, see figures :
1. Internet Explorer 8
A tiny scroll bar to manipulate the dropdown box values.

2. FireFox 3.6.10
No scroll bar, look like a normal “textbox”, but you can click on the “textbox” and “drag up or down” or “key up and down” to manipulate the value.

3. Google Chrome 6.0.472.63
In Google Chrome, both << select element with "multiple" and size="1" attribute - "h:selectManyMenu” tag >> and << select element with "multiple" and size="total of records" attribute - "h:selectManyListbox” tag >> are display the exact layout.

Conclusion
Just forget about “h:selectManyMenu” tag, there is really no reason to use it. The “h:selectManyListbox” tag is a good alternative.
JSF 2 multiple select dropdown box example的更多相关文章
- JSF 2 multiple select listbox example
In JSF, <h:selectManyListbox /> tag is used to render a multiple select listbox – HTML select ...
- JSF 2 dropdown box example
In JSF, <h:selectOneMenu /> tag is used to render a dropdown box – HTML select element with &q ...
- 目录窗口多选Multiple Select in Catalog Window or arccatalog
目录窗口多选Multiple Select in Catalog Window or arccatalog 商务合作,科技咨询,版权转让:向日葵,135-4855__4328,xiexiaokui#q ...
- 实现两个select list box间item的移动和过滤
<head> <title> </title> <!--Standard jQuery --> <script type="text/j ...
- html multiple select option 分组
普通html方式展示<select name="viewType" style="width: 100%;height: 300px;" multiple ...
- [Angular 2] Build a select dropdown with *ngFor in Angular 2
We want the start-pipe more flexable to get param, so when using it, we pass a second param as statu ...
- [XAF] How to represent an enumeration property via a drop-down box with check boxes
https://www.devexpress.com/Support/Center/Example/Details/E689
- jQuery get selected text from SELECT (or DROPDOWN) list box
Most of the time in JavaScript we want to do following things with Select (or dropdown) list box. – ...
- Check Box Select/Deselect All on Grid
The below function is to be used on a grid with multiple check boxes. Place the code behind a FieldC ...
随机推荐
- 信号量及PV原语
操作系统中进程互斥和同步的实现的一个最基本的方方是使用信号量和PV原语. 信号量S的物理意义:当S≥0的时候表示,某个资源可以使用的数量,当S<0的时候,其绝对值表示等待某个资源的进程数. 一般 ...
- LA 3029 - City Game (简单扫描线)
题目链接 题意:给一个m*n的矩阵, 其中一些格子是空地(F), 其他是障碍(R).找一个全部由F 组成的面积最大的子矩阵, 输出其面积乘以3的结果. 思路:如果用枚举的方法,时间复杂度是O(m^2 ...
- svn is already under version control问题解决
svn ci 时出现 xx is already under version control,然后无法提交,出现这个问题的原因是你所提交的文件或目录是其他SVN的东西,即下面有.svn的目录,需要先把 ...
- 基于XMPP的即时通信系统的建立(六)— 开发环境搭建
服务器端 新建空工程 使用Eclipse新建名为openfire的空java工程. 导入源代码 这里使用的是openfire的openfire_src_3_10_3.zip源码. 导入后将目录src/ ...
- bzoj3140
首先考虑二维的情况 min(x,y)也就意味着确定最小后,另外一维肯定打满 然后最小那个如果是k的话就相当于用k*1次——这不就是行列覆盖吗,二分图秒之 三维呢?考虑到a*b*c<=5000也就 ...
- HTMLParser 解析HTML
from html.parser import HTMLParser from html.entities import name2codepoint class MyHTMLParser(HTMLP ...
- 【转】.. Android应用内存泄露分析、改善经验总结
原文网址:http://wetest.qq.com/lab/view/107.html?from=ads_test2_qqtips&sessionUserType=BFT.PARAMS.194 ...
- IE下JS接受ActiveX控件方法
1.常规写法 <SCRIPT type="text/javascript" FOR="activexID" EVENT="onXXXevent( ...
- C#网络资源列表
1, http://club.topsage.com/thread-371996-1-1.html
- mybatis返回HashMap结果类型与映射
<!-- 返回HashMap结果 类型--> <!-- 如果想返回JavaBean,只需将resultType设置为JavaBean的别名或全限定名 --> <!-- T ...