diff --git a/pom.xml b/pom.xml
index b9743d7..ce21f8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -121,14 +121,14 @@
org.eclipse.swt.gtk.linux
x86
3.3.0-v3346
- provided
+ compile
org.eclipse
jface
3.3.0-I20070606-0010
- provided
+ compile
@@ -233,8 +233,108 @@
-->
-
-
+
+
+
+ linux-x86
+
+
+ i386
+ unix
+ linux
+
+
+
+
+ org.eclipse.swt.gtk.linux
+ x86
+ [3.2.0,4.0.0)
+
+
+
+
+ linux-x86_64
+
+
+ amd64
+ unix
+ linux
+
+
+
+
+ org.eclipse.swt.gtk.linux
+ x86_64
+ [3.2.0,4.0.0)
+
+
+
+
+ solaris-sparc
+
+
+ sparc
+ unix
+ SunOS
+
+
+
+
+ org.eclipse.swt.gtk.solaris
+ sparc
+ [3.2.0,4.0.0)
+
+
+
+
+ macosx
+
+
+ unix
+ mac os x
+
+
+
+
+ org.eclipse.swt.carbon
+ macosx
+ [3.2.0,4.0.0)
+
+
+
+
+ win32
+
+
+ x86
+ windows
+
+
+
+
+ org.eclipse.swt.win32.win32
+ x86
+ [3.2.0,4.0.0)
+
+
+
+
+ win64
+
+
+ amd64
+ windows
+
+
+
+
+ org.eclipse.swt.win32.win32
+ x86_64
+ [3.2.0,4.0.0)
+
+
+
+
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascAnnotationParser.java b/src/main/java/com/idcanet/vasc/annotations/VascAnnotationParser.java
index b9d7032..3bf6e6f 100644
--- a/src/main/java/com/idcanet/vasc/annotations/VascAnnotationParser.java
+++ b/src/main/java/com/idcanet/vasc/annotations/VascAnnotationParser.java
@@ -37,25 +37,6 @@ import java.lang.reflect.Method;
*/
public class VascAnnotationParser {
- /** Determens if no when no annotation is found null will return or default key */
- private Boolean noAnnotationNullReturn = null;
-
- /**
- * Creates an VascAnnotationParser
- */
- public VascAnnotationParser() {
- setNoAnnotationNullReturn(false);
- }
-
- /**
- * Determens if no when no annotation is found null will return or default key
- * default is false
- * @param noAnnotationNullReturn
- */
- public VascAnnotationParser(boolean noAnnotationNullReturn) {
- setNoAnnotationNullReturn(noAnnotationNullReturn);
- }
-
/**
* Gets the key of the VascToolTip key for the property of the class
* @param beanClass The class to search for the property
@@ -137,6 +118,15 @@ public class VascAnnotationParser {
public Boolean getVascFieldOptional(Class> beanClass,String property) {
return (Boolean)getValue(beanClass,VascField.class,property,"optional");
}
+ public Boolean getVascFieldSortable(Class> beanClass,String property) {
+ return (Boolean)getValue(beanClass,VascField.class,property,"sortable");
+ }
+ public Boolean getVascFieldSumable(Class> beanClass,String property) {
+ return (Boolean)getValue(beanClass,VascField.class,property,"sumable");
+ }
+ public Boolean getVascFieldGraphable(Class> beanClass,String property) {
+ return (Boolean)getValue(beanClass,VascField.class,property,"graphable");
+ }
public String getVascFieldType(Class> beanClass,String property) {
@@ -147,6 +137,13 @@ public class VascAnnotationParser {
}
+ public Class> getVascFieldTemplateClass(Class> beanClass,String property) {
+ return (Class>)getValue(beanClass,VascFieldTemplate.class,property,"templateClass");
+ }
+ public String getVascFieldTemplate(Class> beanClass,String property) {
+ return (String)getValue(beanClass,VascFieldTemplate.class,property,"template");
+ }
+
public String getVascRolesCreate(Class> beanClass,String property) {
return (String)getValue(beanClass,VascRoles.class,property,"rolesCreate");
}
@@ -159,6 +156,15 @@ public class VascAnnotationParser {
public String getVascRolesList(Class> beanClass,String property) {
return (String)getValue(beanClass,VascRoles.class,property,"rolesList");
}
+
+
+ public VascChoices getVascChoices(Class> beanClass,String property) {
+ return (VascChoices)getValue(beanClass,VascChoices.class,property,null);
+ }
+ public VascEventListener getVascEventListener(Class> beanClass) {
+ return (VascEventListener)getValue(beanClass,VascEventListener.class,null,null);
+ }
+
/**
* TODO: change this, because we need differnce between key and value instance
@@ -166,36 +172,67 @@ public class VascAnnotationParser {
* @param property
* @return
*/
- public Object getVascDefaultValue(Class> beanClass,String property) {
- return getValue(beanClass,VascDefaultValue.class,property,null);
+ public String getVascDefaultValue(Class> beanClass,String property) {
+ return (String)getValue(beanClass,VascDefaultValue.class,property,null);
}
- public Object getVascDefaultValue(Class> beanClass) {
- return getValue(beanClass,VascDefaultValue.class,null,null);
- }
public String getVascDisplayName(Class> beanClass) {
+ //System.out.println("========== GetDisPlayName: "+beanClass);
for (Method method:beanClass.getMethods()) {
- if(method.getName().startsWith("get")==false) { //a bit durty
+ if (method.getName().startsWith("get")==false) { //a bit durty
continue;
}
+ VascFieldTemplate template = method.getAnnotation(VascFieldTemplate.class);
+ if (template!=null) {
+ //System.out.println("Search template for: "+method.getName());
+ String tempProp = method.getName().substring(3);
+ if ("".equals(template.template())==false) {
+ tempProp = template.template();
+ }
+ for (Method method2:template.templateClass().getMethods()) {
+ if (method2.getName().equalsIgnoreCase("get"+tempProp)==false) { //a bit durty
+ continue;
+ }
+ Annotation anno = method2.getAnnotation(VascDisplayName.class);
+ //System.out.println("Template annot: "+anno+" prop: "+tempProp);
+ if (anno==null) {
+ break;
+ }
+ //System.out.println("Found template");
+ return method.getName().substring(3,4).toLowerCase()+method.getName().substring(4); // field name without get
+ }
+ }
Annotation anno = method.getAnnotation(VascDisplayName.class);
if (anno==null) {
continue;
}
+ //System.out.println("Found normal");
return method.getName().substring(3,4).toLowerCase()+method.getName().substring(4); // field name without get
}
- return null;
+ //System.out.println("Defraulting to key");
+ return getVascPrimaryKey(beanClass); // fall back on primary key
}
+
public String getVascDisplayName(Class> beanClass,String property) {
for (Method method:beanClass.getMethods()) {
if (method.getName().equalsIgnoreCase("get"+property)==false) { //a bit durty
continue;
}
- VascI18nModelReference mt = method.getAnnotation(VascI18nModelReference.class);
+ VascFieldTemplate template = method.getAnnotation(VascFieldTemplate.class);
+ if (template!=null) {
+ String tempProp = property;
+ if ("".equals(template.template())==false) {
+ tempProp = template.template();
+ }
+ String value = getVascDisplayName(template.templateClass(),tempProp);
+ if (value!=null) {
+ return value;
+ }
+ }
+ VascModelReference mt = method.getAnnotation(VascModelReference.class);
if (mt==null) {
- String result = (String)getValue(beanClass,VascField.class,property,"displayName");
- return result;
+ return null; // no display name
}
Class> typeClass = mt.type();
if (Object.class==mt.type()) {
@@ -212,13 +249,20 @@ public class VascAnnotationParser {
if(method.getName().startsWith("get")==false) { //a bit durty
continue;
}
+ VascFieldTemplate template = method.getAnnotation(VascFieldTemplate.class);
+ if (template!=null) {
+ String value = getVascPrimaryKey(template.templateClass());
+ if (value!=null) {
+ return value;
+ }
+ }
Annotation anno = method.getAnnotation(VascPrimaryKey.class);
if (anno==null) {
continue;
}
return method.getName().substring(3,4).toLowerCase()+method.getName().substring(4); // field name without get
}
- return null;
+ return null; // maybe fallback on getId() ?
}
@@ -242,25 +286,24 @@ public class VascAnnotationParser {
if (field!=null) {
def = def+"."+field;
}
+
Annotation anno = beanClass.getAnnotation(annotationType);
if (anno==null) {
// no annotation == no default
if (annotationType.equals(VascDefaultValue.class)) {
return null;
}
-
- // no annotion avaible
- if (noAnnotationNullReturn) {
- return null;
- }
+ if (annotationType.equals(VascEventListener.class)) {
+ return null;
+ }
} else {
+ if (annotationType.equals(VascEventListener.class)) {
+ return anno;
+ }
result = doAnnotation(anno,def,field);
if(result!=null) {
return result;
}
- if (noAnnotationNullReturn) {
- return null;
- }
}
return def;
}
@@ -281,16 +324,50 @@ public class VascAnnotationParser {
continue;
}
//logger.finer("Found property: "+property);
- VascI18nModelReference mt = method.getAnnotation(VascI18nModelReference.class);
- if (mt!=null && annotationType.equals(VascI18n.class)) {
+ VascModelReference mt = method.getAnnotation(VascModelReference.class);
+ if (mt!=null & (annotationType.equals(VascI18n.class) | annotationType.equals(VascField.class) | annotationType.equals(VascStyle.class) )) {
Class typeClass = mt.type();
if (Object.class==mt.type()) {
typeClass = method.getReturnType();
- //return returnType.getName()+"."+annotationType.toString();
}
- // recursif function:
- return getValue(typeClass,annotationType,propRest,field);
+ if ( annotationType.equals(VascStyle.class) ) {
+ String disName = getVascDisplayName(typeClass);
+ return getValue(typeClass,annotationType,disName,field);
+ }
+
+
+ if ( annotationType.equals(VascField.class) ) {
+ if ("backendName".equals(field)) {
+ //return property+"."+getValue(typeClass,annotationType,propRest,field);
+ }
+ } else {
+ // recursif function:
+ return getValue(typeClass,annotationType,propRest,field);
+ }
+ }
+
+ VascFieldTemplate template = method.getAnnotation(VascFieldTemplate.class);
+ if (template!=null) {
+
+ if (annotationType.equals(VascFieldTemplate.class)) {
+ if ("templateClass".equals(field)) {
+ return template.templateClass();
+ }
+ if ("template".equals(field)) {
+ return template.template();
+ }
+ return null;
+ }
+
+ String tempProp = property;
+ if ("".equals(template.template())==false) {
+ tempProp = template.template();
+ }
+ Object value = getValue(template.templateClass(),annotationType,tempProp,field);
+ if (value!=null) {
+ return value;
+ }
}
Annotation anno = method.getAnnotation(annotationType);
@@ -302,9 +379,6 @@ public class VascAnnotationParser {
if(result!=null) {
return result;
}
- if (noAnnotationNullReturn) {
- return null;
- }
break; // return default
}
@@ -337,6 +411,9 @@ public class VascAnnotationParser {
if ("optional".equals(field)) {
return VascField.class.getMethod("optional").getDefaultValue();
}
+ if ("sortable".equals(field)) {
+ return VascField.class.getMethod("sortable").getDefaultValue();
+ }
// This are the default value then....
return null;
} catch (Exception e) {
@@ -344,6 +421,9 @@ public class VascAnnotationParser {
return false;
}
}
+ if (annotationType.equals(VascFieldTemplate.class)) {
+ return null;
+ }
if (annotationType.equals(VascFieldType.class)) {
return null;
}
@@ -353,6 +433,12 @@ public class VascAnnotationParser {
if (annotationType.equals(VascRoles.class)) {
return null;
}
+ if (annotationType.equals(VascChoices.class)) {
+ return null;
+ }
+ if (annotationType.equals(VascEventListener.class)) {
+ return null;
+ }
if (annotationType.equals(VascFieldOrder.class)) {
int indexOrder = 0;
for (Method method:beanClass.getMethods()) {
@@ -401,12 +487,16 @@ public class VascAnnotationParser {
VascFieldOrder v = (VascFieldOrder)b;
return v.orderIndex();
}
+ if (a.equals(VascChoices.class)) {
+ VascChoices v = (VascChoices)b;
+ return v;
+ }
if (a.equals(VascDefaultValue.class)) {
VascDefaultValue v = (VascDefaultValue)b;
- if ("null".equals(v.defaultValue())) {
- return "";
+ if ("null".equals(v.value())) {
+ return null;
}
- return v.defaultValue();
+ return v.value();
}
if (a.equals(VascStyle.class)) {
VascStyle c = (VascStyle)b;
@@ -460,6 +550,15 @@ public class VascAnnotationParser {
if ("optional".equals(field)) {
return c.optional();
}
+ if ("sortable".equals(field)) {
+ return c.sortable();
+ }
+ if ("sumable".equals(field)) {
+ return c.sumable();
+ }
+ if ("graphable".equals(field)) {
+ return c.graphable();
+ }
return null;
}
if (a.equals(VascFieldType.class)) {
@@ -505,19 +604,4 @@ public class VascAnnotationParser {
return null;
}
-
- /**
- * default is false
- * @return Returns the noAnnotationNullReturn.
- */
- public Boolean getNoAnnotationNullReturn() {
- return noAnnotationNullReturn;
- }
-
- /**
- * @param noAnnotationNullReturn The noAnnotationNullReturn to set.
- */
- public void setNoAnnotationNullReturn(Boolean noAnnotationNullReturn) {
- this.noAnnotationNullReturn = noAnnotationNullReturn;
- }
}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascChoices.java b/src/main/java/com/idcanet/vasc/annotations/VascChoices.java
index 4ed5dfb..f4bcb29 100644
--- a/src/main/java/com/idcanet/vasc/annotations/VascChoices.java
+++ b/src/main/java/com/idcanet/vasc/annotations/VascChoices.java
@@ -46,7 +46,13 @@ public @interface VascChoices {
String[] choisesKeys() default {};
- String[] choisesNames();
+ String[] choisesValues() default {};
+
+ Class> choisesType() default String.class;
boolean choisesAsRadio() default false;
+
+ String nullLabel() default "null";
+
+ String nullKeyValue() default "null";
}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascChoicesSelectItemModel.java b/src/main/java/com/idcanet/vasc/annotations/VascChoicesSelectItemModel.java
new file mode 100644
index 0000000..c51e516
--- /dev/null
+++ b/src/main/java/com/idcanet/vasc/annotations/VascChoicesSelectItemModel.java
@@ -0,0 +1,110 @@
+/**
+ *
+ */
+package com.idcanet.vasc.annotations;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import com.idcanet.vasc.core.VascException;
+import com.idcanet.vasc.core.ui.VascSelectItem;
+import com.idcanet.vasc.core.ui.VascSelectItemModel;
+
+/**
+ * Selected the vasc choices
+ *
+ *
+ * @author Willem Cazander
+ * @version 1.0 Apr 23, 2009
+ */
+@SuppressWarnings("serial")
+public class VascChoicesSelectItemModel implements VascSelectItemModel,Serializable {
+
+ private VascChoices vascChoices = null;
+ private String nullLabel = null;
+ private String nullKeyValue = null;
+
+ public VascChoicesSelectItemModel(VascChoices vascChoices) {
+ this.vascChoices=vascChoices;
+ }
+
+ /**
+ * @see com.idcanet.vasc.core.ui.VascSelectItemModel#getVascSelectItems(com.idcanet.vasc.core.VascEntry)
+ */
+ public List getVascSelectItems(com.idcanet.vasc.core.VascEntry entry) throws VascException {
+ List result = new ArrayList(10);
+ if ("null".equals(vascChoices.nullLabel())==false) {
+ nullLabel = vascChoices.nullLabel();
+ nullKeyValue = vascChoices.nullKeyValue();
+ }
+ if (nullLabel!=null) {
+ if (nullKeyValue==null) {
+ nullKeyValue = "null";
+ }
+ String nullLabelText = entry.getVascFrontendData().getVascEntryResourceResolver().getTextValue(nullLabel);
+ VascSelectItem item = new VascSelectItem(nullLabelText,null,nullKeyValue);
+ result.add(item);
+ }
+ int index = 0;
+ boolean val = false;
+ String[] a = vascChoices.choisesKeys();
+ if (a.length==0) {
+ a=vascChoices.choisesValues();
+ val = true;
+ } else if (vascChoices.choisesKeys().length!=vascChoices.choisesValues().length) {
+ throw new IllegalStateException("Can't have unequal sizes of array of keys and values of vascChoices annotation.");
+ }
+ for (String key:a) {
+ VascSelectItem item = new VascSelectItem();
+ String name = null;
+ if (val) {
+ name = key;
+ } else {
+ name = entry.getVascFrontendData().getVascEntryResourceResolver().getTextValue(key);
+ }
+ item.setLabel(name);
+ Object value = vascChoices.choisesValues()[index];
+ if (vascChoices.choisesType().equals(String.class)==false) {
+ try {
+ value = vascChoices.choisesType().getConstructor(String.class).newInstance(key);
+ } catch (Exception e) {
+ }
+ }
+ item.setValue(value);
+ item.setKeyValue(key);
+ result.add(item);
+
+ index++;
+ }
+ return result;
+ }
+
+ /**
+ * @return the nullLabel
+ */
+ public String getNullLabel() {
+ return nullLabel;
+ }
+
+ /**
+ * @param nullLabel the nullLabel to set
+ */
+ public void setNullLabel(String nullLabel) {
+ this.nullLabel = nullLabel;
+ }
+
+ /**
+ * @return the nullKeyValue
+ */
+ public String getNullKeyValue() {
+ return nullKeyValue;
+ }
+
+ /**
+ * @param nullKeyValue the nullKeyValue to set
+ */
+ public void setNullKeyValue(String nullKeyValue) {
+ this.nullKeyValue = nullKeyValue;
+ }
+}
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascDefaultValue.java b/src/main/java/com/idcanet/vasc/annotations/VascDefaultValue.java
index 86dd7e4..b3a46bc 100644
--- a/src/main/java/com/idcanet/vasc/annotations/VascDefaultValue.java
+++ b/src/main/java/com/idcanet/vasc/annotations/VascDefaultValue.java
@@ -48,5 +48,5 @@ public @interface VascDefaultValue {
* Note: special value for default, because else we can not set empty.
* @return
*/
- String defaultValue() default "null";
+ String value() default "null";
}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascEventListener.java b/src/main/java/com/idcanet/vasc/annotations/VascEventListener.java
new file mode 100644
index 0000000..8c563d4
--- /dev/null
+++ b/src/main/java/com/idcanet/vasc/annotations/VascEventListener.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2004-2006 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import com.idcanet.vasc.core.entry.VascEntryEventListener.VascEventType;
+
+
+/**
+ * Event listener annotation
+ *
+ * @author Willem Cazander
+ * @version 1.0 Apr 23, 2009
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+public @interface VascEventListener {
+
+ String[] listeners();
+
+ VascEventType[] types();
+}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascField.java b/src/main/java/com/idcanet/vasc/annotations/VascField.java
index 9a20897..1d08b63 100644
--- a/src/main/java/com/idcanet/vasc/annotations/VascField.java
+++ b/src/main/java/com/idcanet/vasc/annotations/VascField.java
@@ -59,4 +59,10 @@ public @interface VascField {
boolean view() default true;
boolean optional() default false;
+
+ boolean sortable() default true;
+
+ boolean sumable() default false;
+
+ boolean graphable() default false;
}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascFieldTemplate.java b/src/main/java/com/idcanet/vasc/annotations/VascFieldTemplate.java
new file mode 100644
index 0000000..a250ed3
--- /dev/null
+++ b/src/main/java/com/idcanet/vasc/annotations/VascFieldTemplate.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004-2006 IDCA. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification, are permitted provided that the
+ * following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice, this list of conditions and
+ * the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions
+ * and the following disclaimer in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY IDCA AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL IDCA OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ * The views and conclusions contained in the software and documentation are those of the authors and
+ * should not be interpreted as representing official policies, either expressed or implied, of IDCA.
+ */
+
+package com.idcanet.vasc.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+
+/**
+ * Adds template support for the vasc annotations.
+ *
+ * @author Willem Cazander
+ * @version 1.0 May 12, 2009
+ */
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.METHOD)
+public @interface VascFieldTemplate {
+
+ /**
+ * The choices template for this field.
+ */
+ String template() default "";
+
+ /**
+ * The template class to get the templated property
+ */
+ Class> templateClass();
+}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/annotations/VascI18nModelReference.java b/src/main/java/com/idcanet/vasc/annotations/VascModelReference.java
similarity index 97%
rename from src/main/java/com/idcanet/vasc/annotations/VascI18nModelReference.java
rename to src/main/java/com/idcanet/vasc/annotations/VascModelReference.java
index cf60047..fbdafe4 100644
--- a/src/main/java/com/idcanet/vasc/annotations/VascI18nModelReference.java
+++ b/src/main/java/com/idcanet/vasc/annotations/VascModelReference.java
@@ -40,7 +40,7 @@ import java.lang.annotation.Target;
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
-public @interface VascI18nModelReference {
+public @interface VascModelReference {
Class> type() default Object.class;
}
\ No newline at end of file
diff --git a/src/main/java/com/idcanet/vasc/backends/jdbc/JdbcVascBackend.java b/src/main/java/com/idcanet/vasc/backends/jdbc/JdbcVascBackend.java
index 8757fc7..18f5a10 100644
--- a/src/main/java/com/idcanet/vasc/backends/jdbc/JdbcVascBackend.java
+++ b/src/main/java/com/idcanet/vasc/backends/jdbc/JdbcVascBackend.java
@@ -35,6 +35,7 @@ import java.util.List;
import java.util.Map;
import com.idcanet.vasc.core.AbstractVascBackend;
+import com.idcanet.vasc.core.VascBackendState;
import com.idcanet.vasc.core.VascEntry;
import com.idcanet.vasc.core.VascEntryField;
import com.idcanet.vasc.core.VascException;
@@ -70,13 +71,14 @@ public class JdbcVascBackend extends AbstractVascBackend {
}
/**
- * @see com.idcanet.vasc.core.VascBackend#execute()
+ * @see com.idcanet.vasc.core.VascBackend#execute(VascBackendState state)
*/
- public List