JSF SelectManyMenu Example

The JSF SelectManyMenu renders an HTML <Select> tag. It allows User to select more than one item in the menu at a time. JSF sets the size of the SelectOnemenu to One so only one value will be displayed at a time. The user needs to scroll down to see the other values (See the Last Image). Below are the JSF and its corresponding HTML tag

JSF SelectManyMenu

<h:selectManyMenu value=“#{user.color}”>

<f:selectItem itemLabel=“Blue” itemValue=“Blue” />

<f:selectItem itemLabel=“Green” itemValue=“Green” />

<f:selectItem itemLabel=“Red” itemValue=“Red” />



HTML <Select>


<select multiple=”multiple” name=”j_idt2:j_idt3″ size=”1″>

<option value=”Blue”>Blue</option>

<option value=”Green”>Green</option>

<option value=”Red”>Red</option>



JSF h:SelectManyMenu Example


The below JSF has a <h:selectManyMenu> where the value is bound to the backing bean class. By default.




Below is the backing bean class




This is how the page looks like in the browser. As you see below, The SelectManyMenu display only one item 


112717_0406_JSFSelectMa1 JSF SelectManyMenu Example


Download Project


govindan JSF SelectManyMenu Example
Connect me


Thank you for visiting my personal blog. Myself Govindan, Software Developer by profession since 2006 and hence I started this blog early in 2016 and ever since I've been writing about technologies experienced and learnings of everyday life.

The views expressed on this blog are my personal views and do not necessarily reflect the views of my employer.

Please feeling free to reach me on any comments and feedbacks you have. Would be more than glad to listen and reply šŸ™‚
govindan JSF SelectManyMenu Example
Connect me
By | 2017-11-26T23:19:21+00:00 November 26th, 2017|Categories: JSF|Tags: , , , , |Comments Off on JSF SelectManyMenu Example
Like us on Facebook.