Following is my code
<rich:select id="cycle_group" value="#{menuCycleBean.menuCycleDetailTO.menuCycleGroupId}" defaultLabel="#{msg['gobal.select.default.label']}"
converter="javax.faces.convert.IntegerConverter">
<f:selectItems value="#{menuCycleBean.cycleGroupList}" var="n" itemLabel="#{n.label}" itemValue="#{n.id}" />
</rich:select>
“menuCycleGroupId” is “Integer” Value and “n.id” is “String” value. I need to convert String to Integer. I am using following attribute converter="javax.faces.convert.IntegerConverter", but it is giving error.
Expression Error: Named Object: javax.faces.convert.IntegerConverter not found.
How can I use converter with <rich:select>?
The
converterattribute must point to either a concrete instance like#{bean.converter}or contain a string literal with the converter ID and not the fully qualified converter class name. If you click throughCONVERTER_IDfield constant in the standard converter’s javadoc, then you’ll find out that it’sjavax.faces.Integerfor theIntegerConverter.So, this should do: