I want to use filter attribute for <p:selectOneMenu> which has a list of items of type Units which is an Enum class as shown below:
public enum Units {
PERCENT, MILLIMETER, METER, NUMBER
}
When I use filter with <p:selectOneMenu>, nothing is filtered. I think it is because the list has items of type Units and I am comparing Strings in the filter. Should I use a converter for the Unit items to be converted to String before I can match them in the filter? If so, how should my converter be?
Okay, this is how I made it working. In the
<p:selectOneMenu>I added an attributeheight="200". As per the code snippet SelectOneMenu with filter not working with less than 10 elements, the filter only works if the height is set.