diff --git a/src/main/java/net/bootsfaces/demo/selectOneMenu/Beer.java b/src/main/java/net/bootsfaces/demo/selectOneMenu/Beer.java
new file mode 100644
index 00000000..016d64fe
--- /dev/null
+++ b/src/main/java/net/bootsfaces/demo/selectOneMenu/Beer.java
@@ -0,0 +1,32 @@
+package net.bootsfaces.demo.selectOneMenu;
+
+/**
+ * Example taken from : https://memorynotfound.com/using-custom-converter-for-hselectonemenu/
+ */
+
+public class Beer {
+
+ private Integer id;
+ private String brand;
+
+ public Beer(Integer id, String brand) {
+ this.id = id;
+ this.brand = brand;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getBrand() {
+ return brand;
+ }
+
+ public void setBrand(String brand) {
+ this.brand = brand;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/bootsfaces/demo/selectOneMenu/BeerConverter.java b/src/main/java/net/bootsfaces/demo/selectOneMenu/BeerConverter.java
new file mode 100644
index 00000000..d8c856a1
--- /dev/null
+++ b/src/main/java/net/bootsfaces/demo/selectOneMenu/BeerConverter.java
@@ -0,0 +1,32 @@
+package net.bootsfaces.demo.selectOneMenu;
+
+import javax.el.ValueExpression;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.convert.Converter;
+import javax.faces.convert.FacesConverter;
+
+/**
+ * Example taken from : https://memorynotfound.com/using-custom-converter-for-hselectonemenu/
+ */
+
+@FacesConverter(value = "beerConverter")
+public class BeerConverter implements Converter {
+
+ @Override
+ public Object getAsObject(FacesContext ctx, UIComponent uiComponent, String beerId) {
+ System.out.println("getAsObject:" + beerId);
+
+ ValueExpression vex = ctx.getApplication().getExpressionFactory().createValueExpression(ctx.getELContext(),
+ "#{beersBean}", BeersBean.class);
+
+ BeersBean beers = (BeersBean) vex.getValue(ctx.getELContext());
+ return beers.getBeer(Integer.valueOf(beerId));
+ }
+
+ @Override
+ public String getAsString(FacesContext facesContext, UIComponent uiComponent, Object beer) {
+ System.out.println("getAsString:" + beer);
+ return ((Beer) beer).getId().toString();
+ }
+}
diff --git a/src/main/java/net/bootsfaces/demo/selectOneMenu/BeersBean.java b/src/main/java/net/bootsfaces/demo/selectOneMenu/BeersBean.java
new file mode 100644
index 00000000..6a93229c
--- /dev/null
+++ b/src/main/java/net/bootsfaces/demo/selectOneMenu/BeersBean.java
@@ -0,0 +1,72 @@
+package net.bootsfaces.demo.selectOneMenu;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+
+/**
+ * Example taken from : https://memorynotfound.com/using-custom-converter-for-hselectonemenu/
+ */
+@ManagedBean
+@javax.faces.bean.ViewScoped
+public class BeersBean implements Serializable {
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = -3192521384162408966L;
+ private Beer selectedBeer;
+ private Beer selectedBeer2;
+
+ public Beer getSelectedBeer2() {
+ return selectedBeer2;
+ }
+
+ public void setSelectedBeer2(Beer selectedBeer2) {
+ this.selectedBeer2 = selectedBeer2;
+ }
+
+ private List This example has been inspired by https://memorynotfound.com/using-custom-converter-for-hselectonemenu/.
+ Using converters with <b:selectOneMenu />
+ <b:selectOneMenu />
declaration directly.
This example has been inspired by https://memorynotfound.com/using-custom-converter-for-hselectonemenu/. +
+The list of items can be defined as an <f:selectItems />
tag. BootsFaces uses a modified version of the
algorithm PrimeFaces 5.1 uses to implement <f:selectItems />
. As a result, you can use <b:selectOneMenu>
almost the same way as <b:selectOneMenu>
.