I have a domain class which contains a Class[]
array. I want the contents of that array displayed
using g:select
. Although I cannot find how to access those fields. I tried <%@page import="package.path.to.PropertyDefinition" %>
and then
<g:select from="${PropertyDefinition.types}" name="cust_prop_type"/>
Although I am getting a very big exception of type org.codehaus.groovy.control.MultipleCompilationErrorsException
Is it possible to access that static Array without making use of a Controller class?
I am using version 2.3.7
class PropertyDefinition {
@Transient
public static final Class[] validTypes = [Integer.getClass(), String.getClass(), RefdataValue.getClass(), BigDecimal.getClass()]
.
.
.
Exception:
Caused by: java.lang.NullPointerException at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodGetParameterAnnotations(ReflectiveInterceptor.java:944) at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:357) at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:258) at org.codehaus.groovy.ast.ClassNode.getInterfaces(ClassNode.java:353) at org.codehaus.groovy.ast.ClassNode.declaresInterface(ClassNode.java:945) at org.codehaus.groovy.ast.ClassNode.implementsInterface(ClassNode.java:925) at org.codehaus.groovy.ast.ClassNode.isDerivedFromGroovyObject(ClassNode.java:915) at org.codehaus.groovy.classgen.AsmClassGenerator.isGroovyObject(AsmClassGenerator.java:937) at