Hi everybody, I'm writing a custom component to be used by the Grid component, such that - in a very few words - when the user clicks on an icon placed in the header of a column whose datatype is an Enumeration, I show a dropdown containing all the existing members of that enumeration.
Tapestry definitely has great support for this kind of things, see f.ex. the Enum example of the doc for the Select component<http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/corelib/components/Select.html> . However in this case I cannot use that approach because I'm not creating a page but a component that needs to work with specific enums that become known only at runtime. The part where I'm stuck is that I don't know how to retrieve the java.lang.Class of the enum that is the datatype of my column. Once I have the Class of the enum I can call Class.getEnumConstants(), obtaining a List of the members of that particular enum, and pass that list to SelectModelFactory.create(List<?>, String) to create a SelectModel that I can reference in the t:model attribute of my <t:select> tag in the template. So, is it possible to retrieve the Class of the enum that is the datatype of a Grid column ?