Trails does no support searching for enums, and throws a class cast exception when searching on an entity that has one.
See the simple example, list apples and go to the search form. No matter what you enter in the Origin field, it throws the class cast exception.
Attached a patch that adds a new component called EnumSearchField, and a new search block in the SearchBlocks page named enumSearch. It also adds the corresponding mapping in the searchBlockFinder spring bean. This component renders the search field as a drop down with a default None option as an empty string, and all the enum components.
I also changed the AssociationSearchField component to allow for None in the search form.
I don't know how to test components, so I did not add any unit test (no java code was touched).
thanks a lot