419 total views, 0 views today

JSF SelectOneMenu Example

The JSF SelectOneMenu renders an HTML <Select> tag in the browser. It allows a user to select one item in the list at a time. Below are the JSF and its corresponding HTML tag

JSF SelectOneMenu



HTML <Select>

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


JSF h:SelectOneMenu Example


The below JSF has a <h:selectOneMenu> where the ‘value’ is bound to the backing bean class. By default, it displays the value ‘Red’ because the value set in the backing bean property ‘color’




Below is the backing bean class



This is how the page looks like in the browser


JSF_SelectOneMenu_Example JSF SelectOneMenu Example



Download Project


govindan JSF SelectOneMenu 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 SelectOneMenu Example
Connect me
By | 2017-11-26T22:42:58+00:00 November 26th, 2017|Categories: JSF|Tags: , , , , |Comments Off on JSF SelectOneMenu Example
Like us on Facebook.