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的更多相关文章

  1. JSF 2 multiple select listbox example

    In JSF, <h:selectManyListbox /> tag is used to render a multiple select listbox – HTML select ...

  2. JSF 2 dropdown box example

    In JSF, <h:selectOneMenu /> tag is used to render a dropdown box – HTML select element with &q ...

  3. 目录窗口多选Multiple Select in Catalog Window or arccatalog

    目录窗口多选Multiple Select in Catalog Window or arccatalog 商务合作,科技咨询,版权转让:向日葵,135-4855__4328,xiexiaokui#q ...

  4. 实现两个select list box间item的移动和过滤

    <head> <title> </title> <!--Standard jQuery --> <script type="text/j ...

  5. html multiple select option 分组

    普通html方式展示<select name="viewType" style="width: 100%;height: 300px;" multiple ...

  6. [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 ...

  7. [XAF] How to represent an enumeration property via a drop-down box with check boxes

    https://www.devexpress.com/Support/Center/Example/Details/E689

  8. 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. – ...

  9. 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 ...

随机推荐

  1. python判断文件目录是否存在

    import os os.path.isfile('test.txt')  # 如果不存在就返回False os.path.exists(directory)  # 如果目录不存在就返回False o ...

  2. 函数rec_init_offsets

    http://database.51cto.com/art/201303/383042.htm /*************************************************** ...

  3. 函数ut_2_log

    计算某个数的对数(最大的) 例如 16 计算后为 4 2的4次方为16 例如15 计算后为3 2的3次方为8 /******************************************** ...

  4. uva12169 Disgruntled Judge

    扩展欧几里得. 枚举a,根据x1,x3和递推式可得. (a+1)*b-k*mod=f[3]-a*a*b. 通过扩展欧几里得求出b. 带入原式进行计算. #include<cstdio> # ...

  5. [源代码] - C#代码搜索器 - 续

    在前文 [源代码] - C#代码搜索器 中我开发了一个代码搜索器. 我对其做的最后改动是将索引保存到磁盘中, 以备今后使用. 如今, 我在工作中又接到一项新任务: 有一个大项目, 其中10个负责数据访 ...

  6. OK335xS 网络连接打印信息 hacking

    /*********************************************************************** * OK335xS 网络连接打印信息 hacking ...

  7. ActionBarSherlock的学习笔记(二) ------------ 创建ActionBarSherlock

    将ActionBarSherlock 作为库项目添加到当前的项目中去,然后创建ActionBar,并自定义ActionBar的标题栏 例子如下: import android.os.Bundle; i ...

  8. 【转】个人常用iOS第三方库以及XCode插件介绍 -- 不错

    原文网址:http://adad184.com/2015/07/08/my-favorite-libraries-and-plugins/ 第三方库是现在的程序员离不开的东西 不光是APP开发 基本上 ...

  9. iOS开发:AFNetworking、MKNetworkKit和ASIHTTPRequest比较

    转:http://www.xue5.com/Mobile/iOS/747036.html 之前一直在使用ASIHTTPRequest作为网络库,但是由于其停止更新,iOS7上可能出现更多的问题,于是决 ...

  10. View.VISIBLE、INVISIBLE、GONE的区别

    android中UI应用的开发中经常会使用view.setVisibility()来设置控件的可见性,其中该函数有3个可选值,他们有着不同的含义: View.VISIBLE--->可见View. ...