diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackend.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackend.java index 3b412e6..cc217db 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackend.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackend.java @@ -55,7 +55,7 @@ public interface VascBackend { * note: Do not use inline class here because it needs to be seriabable and the backend is not seriabbzle. * @return */ - public VascEntryFieldValue provideVascEntryFieldValue(); + public VascEntryFieldValue provideVascEntryFieldValue(); /** * Creates a new RecordCreater obj the the given entry. diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackendController.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackendController.java index bcaa1d7..bf9004b 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackendController.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascBackendController.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.backend; +import java.io.Serializable; import java.util.List; @@ -32,7 +33,7 @@ import java.util.List; */ public interface VascBackendController { - public VascBackend getVascBackendById(String id); + public VascBackend getVascBackendById(String id); public List getVascBackendIds(); } \ No newline at end of file diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascEntryFieldValue.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascEntryFieldValue.java index 3070e90..4929bce 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascEntryFieldValue.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/VascEntryFieldValue.java @@ -31,11 +31,11 @@ import java.io.Serializable; * @author Willem Cazander * @version 1.0 Mar 21, 2007 */ -public interface VascEntryFieldValue extends Serializable { +public interface VascEntryFieldValue extends Serializable { - public Object getValue(String backendName,Object record) throws VascBackendException; + public Serializable getValue(String backendName,DATA_OBJECT record) throws VascBackendException; - public String getDisplayValue(String backendName,Object record) throws VascBackendException; + public String getDisplayValue(String backendName,DATA_OBJECT record) throws VascBackendException; - public void setValue(String backendName,Object record,Object value) throws VascBackendException; + public void setValue(String backendName,DATA_OBJECT record,Serializable value) throws VascBackendException; } \ No newline at end of file diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/BeanVascEntryFieldValue.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/BeanVascEntryFieldValue.java index 4df36eb..68f15f3 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/BeanVascEntryFieldValue.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/BeanVascEntryFieldValue.java @@ -23,6 +23,8 @@ package net.forwardfire.vasc.backend.data; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascEntryFieldValue; @@ -34,7 +36,7 @@ import org.x4o.xml.element.DefaultElementObjectPropertyValue; * @author Willem Cazander * @version 1.0 Dec 05, 2009 */ -public class BeanVascEntryFieldValue implements VascEntryFieldValue { +public class BeanVascEntryFieldValue implements VascEntryFieldValue { private static final long serialVersionUID = 1L; private DefaultElementObjectPropertyValue bean = new DefaultElementObjectPropertyValue(); @@ -42,7 +44,7 @@ public class BeanVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#getValue(java.lang.String, java.lang.Object) */ - public Object getValue(String backendName, Object record) throws VascBackendException { + public Serializable getValue(String backendName, DATA_OBJECT record) throws VascBackendException { if (backendName==null) { throw new NullPointerException("Can't get value of null backendName."); } @@ -50,7 +52,7 @@ public class BeanVascEntryFieldValue implements VascEntryFieldValue { throw new NullPointerException("Can't get value of null object."); } try { - Object o = bean.getProperty(record,backendName); + Serializable o = (Serializable)bean.getProperty(record,backendName); return o; } catch (Exception e) { throw new VascBackendException(e); @@ -60,8 +62,8 @@ public class BeanVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#getDisplayValue(java.lang.String, java.lang.Object) */ - public String getDisplayValue(String backendName, Object record) throws VascBackendException { - Object value = getValue(backendName,record); + public String getDisplayValue(String backendName, DATA_OBJECT record) throws VascBackendException { + Serializable value = getValue(backendName,record); if (value==null) { return ""; } @@ -89,7 +91,7 @@ public class BeanVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#setValue(java.lang.String, java.lang.Object, java.lang.Object) */ - public void setValue(String backendName, Object record,Object value) throws VascBackendException { + public void setValue(String backendName, DATA_OBJECT record,Serializable value) throws VascBackendException { if (backendName==null) { throw new NullPointerException("Can't set value of null backendName."); } diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryFieldValue.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryFieldValue.java index 6b03d12..f5ca5f7 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryFieldValue.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryFieldValue.java @@ -22,43 +22,41 @@ package net.forwardfire.vasc.backend.data; -import java.util.Map; +import java.io.Serializable; +import java.util.HashMap; import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascEntryFieldValue; - /** * MapVascEntryFieldValue provides get/set support on Map record object. * * @author Willem Cazander * @version 1.0 Dec 05, 2009 */ -public class HashMapVascEntryFieldValue implements VascEntryFieldValue { +public class HashMapVascEntryFieldValue implements VascEntryFieldValue> { private static final long serialVersionUID = 1L; /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#getValue(java.lang.String, java.lang.Object) */ - @SuppressWarnings("unchecked") - public Object getValue(String backendName, Object record) throws VascBackendException { + public Serializable getValue(String backendName,HashMap map) throws VascBackendException { if (backendName==null) { throw new NullPointerException("Can't get value of null backendName field."); } - if (record==null) { + if (map==null) { throw new NullPointerException("Can't get value of null object."); } - Map map = (Map)record; - Object fieldValue = map.get(backendName); + Serializable fieldValue = map.get(backendName); return fieldValue; } /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#getDisplayValue(net.forwardfire.vasc.core.VascEntryField, java.lang.Object) */ - public String getDisplayValue(String field, Object record) throws VascBackendException { - Object fieldValue = getValue(field,record); + public String getDisplayValue(String field, HashMap record) throws VascBackendException { + Serializable fieldValue = getValue(field,record); if (fieldValue==null) { fieldValue = ""; } @@ -68,10 +66,7 @@ public class HashMapVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.core.entry.VascEntryFieldValue#setValue(java.lang.String, java.lang.Object, java.lang.Object) */ - @SuppressWarnings("unchecked") - public void setValue(String backendName, Object record,Object value) throws VascBackendException { - Map map = (Map)record; + public void setValue(String backendName, HashMap map,Serializable value) throws VascBackendException { map.put(backendName, value); } - } diff --git a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryRecordCreator.java b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryRecordCreator.java index e09f63e..9a62862 100644 --- a/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryRecordCreator.java +++ b/vasc-backend/vasc-backend-api/src/main/java/net/forwardfire/vasc/backend/data/HashMapVascEntryRecordCreator.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.backend.data; +import java.io.Serializable; import java.util.HashMap; import net.forwardfire.vasc.backend.VascBackendException; @@ -33,11 +34,11 @@ import net.forwardfire.vasc.backend.VascEntryRecordCreator; * @author Willem Cazander * @version 1.0 Dec 05, 2009 */ -public class HashMapVascEntryRecordCreator implements VascEntryRecordCreator> { +public class HashMapVascEntryRecordCreator implements VascEntryRecordCreator> { private static final long serialVersionUID = 1L; - public HashMap newRecord() throws VascBackendException { - return new HashMap(10); + public HashMap newRecord() throws VascBackendException { + return new HashMap(10); } } diff --git a/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/MetaModelVascBackend.java b/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/MetaModelVascBackend.java index 0a17573..99ea687 100644 --- a/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/MetaModelVascBackend.java +++ b/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/MetaModelVascBackend.java @@ -45,7 +45,6 @@ import org.eobjects.metamodel.schema.Table; import net.forwardfire.vasc.backend.AbstractVascBackend; import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascBackendState; -import net.forwardfire.vasc.backend.VascEntryFieldValue; import net.forwardfire.vasc.backend.VascEntryRecordCreator; import net.forwardfire.vasc.backend.metamodel.crud.CrudDataContext; import net.forwardfire.vasc.backend.metamodel.crud.UpdateableRow; @@ -283,7 +282,7 @@ public class MetaModelVascBackend extends AbstractVascBackend { crudDataContext.delete((UpdateableRow) object); } - public VascEntryFieldValue provideVascEntryFieldValue() { + public RowVascEntryFieldValue provideVascEntryFieldValue() { return new RowVascEntryFieldValue(); } diff --git a/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/RowVascEntryFieldValue.java b/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/RowVascEntryFieldValue.java index 9d9fca8..b28f6f3 100644 --- a/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/RowVascEntryFieldValue.java +++ b/vasc-backend/vasc-backend-metamodel/src/main/java/net/forwardfire/vasc/backend/metamodel/RowVascEntryFieldValue.java @@ -1,5 +1,7 @@ package net.forwardfire.vasc.backend.metamodel; +import java.io.Serializable; + import org.eobjects.metamodel.data.Row; import org.eobjects.metamodel.query.SelectItem; @@ -7,14 +9,14 @@ import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascEntryFieldValue; import net.forwardfire.vasc.backend.metamodel.crud.UpdateableRow; -public class RowVascEntryFieldValue implements VascEntryFieldValue { +public class RowVascEntryFieldValue implements VascEntryFieldValue { private static final long serialVersionUID = -806674640688182132L; /** * @see net.forwardfire.vasc.backend.VascEntryFieldValue#getValue(java.lang.String, java.lang.Object) */ - public Object getValue(String backendName, Object record) throws VascBackendException { + public Serializable getValue(String backendName, Row record) throws VascBackendException { if (backendName==null) { throw new NullPointerException("Can't get value of null backendName."); } @@ -23,10 +25,9 @@ public class RowVascEntryFieldValue implements VascEntryFieldValue { } if (record instanceof UpdateableRow) { UpdateableRow row = (UpdateableRow)record; - return row.getValue(backendName); + return (Serializable) row.getValue(backendName); } - Row row = (Row)record; - Object fieldValue = row.getValue(indexOf(backendName,row)); + Serializable fieldValue = (Serializable) record.getValue(indexOf(backendName,record)); return fieldValue; } @@ -47,7 +48,7 @@ public class RowVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.backend.VascEntryFieldValue#getDisplayValue(java.lang.String, java.lang.Object) */ - public String getDisplayValue(String backendName, Object record) throws VascBackendException { + public String getDisplayValue(String backendName, Row record) throws VascBackendException { Object fieldValue = getValue(backendName,record); if (fieldValue==null) { fieldValue = ""; @@ -58,7 +59,7 @@ public class RowVascEntryFieldValue implements VascEntryFieldValue { /** * @see net.forwardfire.vasc.backend.VascEntryFieldValue#setValue(java.lang.String, java.lang.Object, java.lang.Object) */ - public void setValue(String backendName, Object record,Object value) throws VascBackendException { + public void setValue(String backendName, Row record,Serializable value) throws VascBackendException { if (record instanceof UpdateableRow) { UpdateableRow row = (UpdateableRow)record; row.setValue(backendName, value); diff --git a/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascBackend.java b/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascBackend.java index 2948812..bcfa772 100644 --- a/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascBackend.java +++ b/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascBackend.java @@ -29,7 +29,6 @@ import java.util.logging.Logger; import net.forwardfire.vasc.backend.AbstractVascBackend; import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascBackendState; -import net.forwardfire.vasc.backend.VascEntryFieldValue; import net.forwardfire.vasc.backend.VascEntryRecordCreator; import com.mongodb.DB; @@ -142,7 +141,7 @@ public class MongodbVascBackend extends AbstractVascBackend { coll.remove(query); // remove by _id } - public VascEntryFieldValue provideVascEntryFieldValue() { + public MongodbVascEntryFieldValue provideVascEntryFieldValue() { return new MongodbVascEntryFieldValue(); } diff --git a/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascEntryFieldValue.java b/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascEntryFieldValue.java index 5694914..eb5532a 100644 --- a/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascEntryFieldValue.java +++ b/vasc-backend/vasc-backend-mongodb/src/main/java/net/forwardfire/vasc/backend/mongodb/MongodbVascEntryFieldValue.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.backend.mongodb; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.backend.VascEntryFieldValue; @@ -33,22 +35,20 @@ import com.mongodb.BasicDBObject; * @author Willem Cazander * @version 1.0 Dec 30, 2011 */ -public class MongodbVascEntryFieldValue implements VascEntryFieldValue { +public class MongodbVascEntryFieldValue implements VascEntryFieldValue { private static final long serialVersionUID = -7371273796529818557L; - public Object getValue(String backendName, Object record) throws VascBackendException { - BasicDBObject row = (BasicDBObject)record; - Object data = row.get(backendName); + public Serializable getValue(String backendName, BasicDBObject row) throws VascBackendException { + Serializable data = (Serializable) row.get(backendName); return data; } - public String getDisplayValue(String field, Object record) throws VascBackendException { - return ""+getValue(field,record); + public String getDisplayValue(String field, BasicDBObject row) throws VascBackendException { + return ""+getValue(field,row); } - public void setValue(String backendName, Object record, Object value) throws VascBackendException { - BasicDBObject row = (BasicDBObject)record; + public void setValue(String backendName, BasicDBObject row, Serializable value) throws VascBackendException { row.put(backendName, value); } } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/annotations/VascChoicesSelectItemModel.java b/vasc-core/src/main/java/net/forwardfire/vasc/annotations/VascChoicesSelectItemModel.java index 927a827..9f458b4 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/annotations/VascChoicesSelectItemModel.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/annotations/VascChoicesSelectItemModel.java @@ -85,10 +85,10 @@ public class VascChoicesSelectItemModel implements VascSelectItemModel,Serializa name = entry.getVascFrontendController().getVascEntryResourceResolver().getTextValue(key); } item.setLabel(name); - Object value = vascChoices.choisesValues()[index]; + Serializable value = vascChoices.choisesValues()[index]; if (vascChoices.choisesType().equals(String.class)==false) { try { - value = vascChoices.choisesType().getConstructor(String.class).newInstance(key); + value = (Serializable) vascChoices.choisesType().getConstructor(String.class).newInstance(key); } catch (Exception e) { } } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/AbstractVascBackendProxy.java b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/AbstractVascBackendProxy.java index 08d0422..7e35da7 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/AbstractVascBackendProxy.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/AbstractVascBackendProxy.java @@ -148,7 +148,7 @@ abstract public class AbstractVascBackendProxy implements VascBackendProxy { /** * @see net.forwardfire.vasc.backend.VascBackend#provideVascEntryFieldValue() */ - public VascEntryFieldValue provideVascEntryFieldValue() { + public VascEntryFieldValue provideVascEntryFieldValue() { return backend.provideVascEntryFieldValue(); } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySearch.java b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySearch.java index 57336bb..597b194 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySearch.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySearch.java @@ -83,8 +83,8 @@ public class VascBackendProxySearch extends AbstractVascBackendProxy { List search = new ArrayList(result.size()/4); for (Serializable record:result) { for (VascEntryField field:entry.getVascEntryFields()) { - VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(); - Object value = fieldValue.getValue(field.getBackendName(), record); + VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(); + Serializable value = fieldValue.getValue(field.getBackendName(), record); if (value==null) { continue; // can't search null values. } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySort.java b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySort.java index ed3a7dc..122b285 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySort.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/backend/proxy/VascBackendProxySort.java @@ -80,10 +80,10 @@ public class VascBackendProxySort extends AbstractVascBackendProxy { return result; } final VascEntryField field = getVascEntryFieldByBackendName(state.getSortField()); - final VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(); - Collections.sort(result, new Comparator() { + final VascEntryFieldValue fieldValue = backend.provideVascEntryFieldValue(); + Collections.sort(result, new Comparator() { @SuppressWarnings("rawtypes") - public int compare(Object o1, Object o2) { + public int compare(Serializable o1, Serializable o2) { try { Comparable c1 = null; Comparable c2 = null; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/AbstractVascEntryFieldLocal.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/AbstractVascEntryFieldLocal.java index 69deb3e..bdede92 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/AbstractVascEntryFieldLocal.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/AbstractVascEntryFieldLocal.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.core; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -42,9 +43,9 @@ abstract public class AbstractVascEntryFieldLocal extends AbstractVascBaseIdRole private String backendName = null; private String displayName = null; private VascEntryFieldType vascEntryFieldType = null; - private VascEntryFieldValue vascEntryFieldValue = null; + private VascEntryFieldValue vascEntryFieldValue = null; private List vascValidators = null; - private Object defaultValue = null; + private Serializable defaultValue = null; private Integer sizeList = null; private Integer sizeEdit = null; private String styleList = null; @@ -142,14 +143,14 @@ abstract public class AbstractVascEntryFieldLocal extends AbstractVascBaseIdRole /** * @return the vascEntryFieldValue */ - public VascEntryFieldValue getVascEntryFieldValue() { + public VascEntryFieldValue getVascEntryFieldValue() { return vascEntryFieldValue; } /** * @param vascEntryFieldValue the vascEntryFieldValue to set */ - public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue) { + public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue) { this.vascEntryFieldValue = vascEntryFieldValue; } @@ -178,14 +179,14 @@ abstract public class AbstractVascEntryFieldLocal extends AbstractVascBaseIdRole /** * @return the defaultValue */ - public Object getDefaultValue() { + public Serializable getDefaultValue() { return defaultValue; } /** * @param defaultValue the defaultValue to set */ - public void setDefaultValue(Object defaultValue) { + public void setDefaultValue(Serializable defaultValue) { this.defaultValue = defaultValue; } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryField.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryField.java index 97ae91b..6fbcb00 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryField.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryField.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.core; +import java.io.Serializable; import java.util.List; import net.forwardfire.vasc.backend.VascEntryFieldValue; @@ -55,7 +56,7 @@ public interface VascEntryField extends VascBaseIdRoleCrudOrderMeta { /** * @return the vascEntryFieldValue */ - public VascEntryFieldValue getVascEntryFieldValue(); + public VascEntryFieldValue getVascEntryFieldValue(); /** * @return the vascValidators @@ -65,7 +66,7 @@ public interface VascEntryField extends VascBaseIdRoleCrudOrderMeta { /** * @return the defaultValue */ - public Object getDefaultValue(); + public Serializable getDefaultValue(); /** * @return the sizeList diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryFieldLocal.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryFieldLocal.java index 5a373f4..75b8b5d 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryFieldLocal.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/VascEntryFieldLocal.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.core; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascEntryFieldValue; import net.forwardfire.vasc.core.base.VascBaseIdRoleCrudOrderMetaLocal; import net.forwardfire.vasc.validators.VascValidator; @@ -53,7 +55,7 @@ public interface VascEntryFieldLocal extends VascEntryField,VascBaseIdRoleCrudOr /** * @param vascEntryFieldValue the vascEntryFieldValue to set */ - public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue); + public void setVascEntryFieldValue(VascEntryFieldValue vascEntryFieldValue); /** * @param vascValidator the vascValidator to add @@ -68,7 +70,7 @@ public interface VascEntryFieldLocal extends VascEntryField,VascBaseIdRoleCrudOr /** * @param defaultValue the defaultValue to set */ - public void setDefaultValue(Object defaultValue); + public void setDefaultValue(Serializable defaultValue); /** * @param sizeList the sizeList to set diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/entry/VascEntryFrontendEventListener.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/entry/VascEntryFrontendEventListener.java index e6f242e..0d3d939 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/entry/VascEntryFrontendEventListener.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/entry/VascEntryFrontendEventListener.java @@ -63,5 +63,5 @@ public interface VascEntryFrontendEventListener extends Serializable { * @param type * @param data */ - public void vascEvent(VascEntry entry,Object data); + public void vascEvent(VascEntry entry,Serializable data); } \ No newline at end of file diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascColumnValueModelListener.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascColumnValueModelListener.java index 11f4e38..3f6eb36 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascColumnValueModelListener.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascColumnValueModelListener.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.core.ui; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.core.VascEntryField; import net.forwardfire.vasc.core.VascException; @@ -35,12 +37,12 @@ import net.forwardfire.vasc.core.VascException; public class VascColumnValueModelListener implements VascValueModelListener { private VascEntryField vascEntryField = null; - private Object bean = null; + private Serializable bean = null; public VascColumnValueModelListener() { } - public VascColumnValueModelListener(VascEntryField vascEntryField,Object bean) { + public VascColumnValueModelListener(VascEntryField vascEntryField,Serializable bean) { setVascEntryField(vascEntryField); setBean(bean); } @@ -70,14 +72,14 @@ public class VascColumnValueModelListener implements VascValueModelListener { /** * @return the bean */ - public Object getBean() { + public Serializable getBean() { return bean; } /** * @param bean the bean to set */ - public void setBean(Object bean) { + public void setBean(Serializable bean) { this.bean = bean; } } \ No newline at end of file diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascSelectItem.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascSelectItem.java index 2d858a3..aaf4a45 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascSelectItem.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascSelectItem.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.core.ui; +import java.io.Serializable; + /** * * @author Willem Cazander @@ -30,18 +32,18 @@ package net.forwardfire.vasc.core.ui; public class VascSelectItem { private String label = null; - private Object value = null; + private Serializable value = null; private String keyValue = null; private boolean disabled = false; public VascSelectItem() { } - public VascSelectItem(String label,Object value) { + public VascSelectItem(String label,Serializable value) { setLabel(label); setValue(value); } - public VascSelectItem(String label,Object value,String keyValue) { + public VascSelectItem(String label,Serializable value,String keyValue) { setLabel(label); setValue(value); setKeyValue(keyValue); @@ -64,14 +66,14 @@ public class VascSelectItem { /** * @return the value */ - public Object getValue() { + public Serializable getValue() { return value; } /** * @param value the value to set */ - public void setValue(Object value) { + public void setValue(Serializable value) { this.value = value; } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascValueModel.java b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascValueModel.java index 553e187..faad83f 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascValueModel.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/core/ui/VascValueModel.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.core.ui; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -37,7 +38,7 @@ import net.forwardfire.vasc.core.VascException; */ public class VascValueModel { - private Object value = null; + private Serializable value = null; private List listeners = null; private VascValueModel parentModel = null; @@ -49,14 +50,14 @@ public class VascValueModel { this.parentModel=parentModel; } - public Object getValue() throws VascException { + public Serializable getValue() throws VascException { if (parentModel!=null) { return parentModel.getValue(); } return value; } - public void setValue(Object value) throws VascException { + public void setValue(Serializable value) throws VascException { if (parentModel!=null) { parentModel.setValue(value); } else { diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendActions.java b/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendActions.java index 85fd79a..3d01358 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendActions.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendActions.java @@ -42,7 +42,7 @@ public interface VascFrontendActions extends VascFrontendEntry { public void persistObject() throws VascFrontendException; - public Object mergeObject() throws VascFrontendException; + public Serializable mergeObject() throws VascFrontendException; public void sortAction(VascEntryField field) throws VascFrontendException; @@ -50,7 +50,7 @@ public interface VascFrontendActions extends VascFrontendEntry { public void pageAction(Integer page) throws VascFrontendException; - public void moveUpAction(Object object) throws VascFrontendException; + public void moveUpAction(Serializable object) throws VascFrontendException; - public void moveDownAction(Object object) throws VascFrontendException; + public void moveDownAction(Serializable object) throws VascFrontendException; } \ No newline at end of file diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendController.java b/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendController.java index e44dbfd..69aed13 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendController.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/frontend/VascFrontendController.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.frontend; +import java.io.Serializable; import java.util.List; import net.forwardfire.vasc.core.VascController; @@ -115,7 +116,7 @@ public interface VascFrontendController { public void initFrontendListeners(VascEntryLocal entry,String frontendType) throws InstantiationException, IllegalAccessException; public void addVascEntryFrontendEventListener(VascEntryFrontendEventListener listener); public List getVascEntryFrontendEventListener(VascEntryFrontendEventListener.VascFrontendEventType type); - public void fireVascFrontendEvent(VascEntry entry,VascFrontendEventType type,Object data); + public void fireVascFrontendEvent(VascEntry entry,VascFrontendEventType type,Serializable data); /** diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/DefaultVascEntryConfigController.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/DefaultVascEntryConfigController.java index 87ce115..0c9e8a3 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/DefaultVascEntryConfigController.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/DefaultVascEntryConfigController.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl; +import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -169,8 +170,8 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll /** * @see net.forwardfire.vasc.core.VascEntryConfigController#configVascBackendProxied(net.forwardfire.vasc.core.VascController, net.forwardfire.vasc.core.VascEntry) */ - public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry) throws VascException { - VascBackend realBackend = vascController.getVascBackendController().getVascBackendById(vascEntry.getBackendId()); + public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry) throws VascException { + VascBackend realBackend = vascController.getVascBackendController().getVascBackendById(vascEntry.getBackendId()); if (realBackend==null) { throw new VascException("Could not find backend: "+vascEntry.getBackendId()); } @@ -180,8 +181,8 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll /** * @see net.forwardfire.vasc.core.VascEntryConfigController#configVascBackendProxied(net.forwardfire.vasc.core.VascController, net.forwardfire.vasc.core.VascEntry, net.forwardfire.vasc.backend.VascBackend) */ - public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry, VascBackend realBackend) throws VascException { - VascBackend backend = realBackend; + public VascBackend configVascBackendProxied(VascController vascController,VascEntry vascEntry, VascBackend realBackend) throws VascException { + VascBackend backend = realBackend; for (VascBackendProxy proxy:backendProxies) { VascBackendProxy proxyClone; try { @@ -247,14 +248,14 @@ public class DefaultVascEntryConfigController implements VascEntryConfigControll } // Add backend to entry - VascBackend backend = vascController.getVascEntryConfigController().configVascBackendProxied(vascController, entry); + VascBackend backend = vascController.getVascEntryConfigController().configVascBackendProxied(vascController, entry); controller.getVascEntryState().setVascBackend(backend); controller.getVascEntryState().setVascEntry(entry); // Fetch all data field value impl for this backend. for (VascEntryField field:entry.getVascEntryFields()) { if (field.getVascEntryFieldValue()==null) { - VascEntryFieldValue v = backend.provideVascEntryFieldValue(); + VascEntryFieldValue v = backend.provideVascEntryFieldValue(); ((VascEntryFieldLocal)field).setVascEntryFieldValue(v); } } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/HibernateValidatorService.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/HibernateValidatorService.java index 56c9e2a..e20e7c1 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/HibernateValidatorService.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/HibernateValidatorService.java @@ -122,7 +122,7 @@ public class HibernateValidatorService implements VascEntryFieldValidatorService //do not resolve the property eagerly to allow validator.apply to work wo interpolator } - @SuppressWarnings("unchecked") + @SuppressWarnings("rawtypes") public String interpolate(String message, Validator validator, MessageInterpolator defaultInterpolator) { if ( annotationMessage!=null && annotationMessage.equals( message ) ) { //short cut diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascActionsFinalizer.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascActionsFinalizer.java index 6d8c303..0855681 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascActionsFinalizer.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascActionsFinalizer.java @@ -23,7 +23,6 @@ package net.forwardfire.vasc.impl.entry.config; import net.forwardfire.vasc.core.VascController; -import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryConfigFinalizer; import net.forwardfire.vasc.core.VascEntryLocal; import net.forwardfire.vasc.core.VascException; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascDefaultsFinalizer.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascDefaultsFinalizer.java index 592ff61..ba2707c 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascDefaultsFinalizer.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascDefaultsFinalizer.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.entry.config; +import java.io.Serializable; import java.util.Locale; import org.x4o.xml.conv.ObjectConverterException; @@ -57,7 +58,7 @@ public class VascDefaultsFinalizer implements VascEntryConfigFinalizer { } // Check if backendId is valid - VascBackend back = vascController.getVascBackendController().getVascBackendById( entry.getBackendId() ); + VascBackend back = vascController.getVascBackendController().getVascBackendById( entry.getBackendId() ); if (back==null) { throw new IllegalArgumentException("The VascEntry backend is not found in backends: '"+entry.getBackendId()+"' in entryId: "+id); } @@ -161,9 +162,9 @@ public class VascDefaultsFinalizer implements VascEntryConfigFinalizer { if (vef.getDefaultValue()!=null && vef.getDefaultValue() instanceof String) { if (vef.getVascEntryFieldType().getObjectConverter() != null) { - Object value; + Serializable value; try { - value = vef.getVascEntryFieldType().getObjectConverter().convertTo(vef.getDefaultValue(), Locale.getDefault()); + value = (Serializable) vef.getVascEntryFieldType().getObjectConverter().convertTo(vef.getDefaultValue(), Locale.getDefault()); } catch (ObjectConverterException e) { throw new VascException(e); } @@ -237,9 +238,9 @@ public class VascDefaultsFinalizer implements VascEntryConfigFinalizer { if (vef.getDefaultValue()!=null && vef.getDefaultValue() instanceof String) { if (vef.getVascEntryFieldType()!=null && vef.getVascEntryFieldType().getObjectConverter() != null) { - Object value; + Serializable value; try { - value = vef.getVascEntryFieldType().getObjectConverter().convertTo(vef.getDefaultValue(), Locale.getDefault()); + value = (Serializable) vef.getVascEntryFieldType().getObjectConverter().convertTo(vef.getDefaultValue(), Locale.getDefault()); } catch (ObjectConverterException e) { throw new VascException(e); } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascIdCheckFinalizer.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascIdCheckFinalizer.java index ccae53e..250007a 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascIdCheckFinalizer.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/entry/config/VascIdCheckFinalizer.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.impl.entry.config; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackend; import net.forwardfire.vasc.core.VascController; import net.forwardfire.vasc.core.VascEntryField; @@ -65,7 +67,7 @@ public class VascIdCheckFinalizer implements VascEntryConfigFinalizer { } // Check if backendId is valid - VascBackend back = vascController.getVascBackendController().getVascBackendById( entry.getBackendId() ); + VascBackend back = vascController.getVascBackendController().getVascBackendById( entry.getBackendId() ); if (back==null) { throw new IllegalArgumentException("The VascEntry backend is not found in backends: '"+entry.getBackendId()+"' in entryId: "+id); } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendActions.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendActions.java index f71d0ab..fa7005f 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendActions.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendActions.java @@ -31,13 +31,11 @@ import net.forwardfire.vasc.backend.VascBackendState; import net.forwardfire.vasc.backend.proxy.VascProxyFilter; import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryField; -import net.forwardfire.vasc.core.VascEntryLocal; import net.forwardfire.vasc.core.entry.VascEntryFrontendEventListener; import net.forwardfire.vasc.core.VascException; import net.forwardfire.vasc.frontend.VascFrontendActions; import net.forwardfire.vasc.frontend.VascFrontendException; - /** * Default impl of default frontend actions * @@ -72,11 +70,11 @@ public class DefaultVascFrontendActions implements VascFrontendActions { continue; // no default value to set. } try { - Object value = field.getVascEntryFieldValue().getValue(field.getBackendName(), object); + Serializable value = field.getVascEntryFieldValue().getValue(field.getBackendName(), object); if (value!=null) { continue; // value is already set by backend creator. } - Object defaultValue = field.getDefaultValue(); + Serializable defaultValue = field.getDefaultValue(); if (defaultValue instanceof String) { String def = (String)defaultValue; if (def.equals("now()")) { // TODO: add default string parsers @@ -93,7 +91,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { return object; } - protected int removeObjectFromDataList(Object object) throws VascBackendException { + protected int removeObjectFromDataList(Serializable object) throws VascBackendException { int indexOld = entry.getVascFrontendController().getVascEntryState().getEntryDataList().indexOf(object); if (entry.getVascFrontendController().getVascEntryState().getEntryDataList().remove(object)) { return indexOld; // java worked well for use @@ -107,7 +105,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { // is only null when creating objects if (idObject!=null) { int index = 0; - for (Object o:entry.getVascFrontendController().getVascEntryState().getEntryDataList()) { + for (Serializable o:entry.getVascFrontendController().getVascEntryState().getEntryDataList()) { field = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId()); Object id = field.getVascEntryFieldValue().getValue(field.getBackendName(), o); if (idObject.equals(id)) { @@ -137,7 +135,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { /** * @see net.forwardfire.vasc.frontend.VascFrontendActions#mergeObject() */ - public Object mergeObject() throws VascFrontendException { + public Serializable mergeObject() throws VascFrontendException { try { return saveObject(false); } catch (VascException e) { @@ -145,7 +143,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { } } - protected Object saveObject(boolean persist) throws VascException { + protected Serializable saveObject(boolean persist) throws VascException { try { Serializable object = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); Serializable result = null; @@ -284,7 +282,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { entry.getVascFrontendController().getVascFrontend().renderView(); } - public void moveUpAction(Object record) throws VascFrontendException { + public void moveUpAction(Serializable record) throws VascFrontendException { if (entry.getVascFrontendController().getVascEntryState().getVascBackend().isRecordMoveable()) { try { VascEntryField p = entry.getVascEntryFieldById(entry.getPrimaryKeyFieldId()); @@ -301,7 +299,7 @@ public class DefaultVascFrontendActions implements VascFrontendActions { entry.getVascFrontendController().getVascFrontend().renderView(); } - public void moveDownAction(Object record) throws VascFrontendException { + public void moveDownAction(Serializable record) throws VascFrontendException { if (entry.getVascFrontendController().getVascEntryState().getVascBackend().isRecordMoveable()) { try { diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendController.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendController.java index ac794fc..6baedc1 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendController.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendController.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.frontend; +import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -362,7 +363,7 @@ public class DefaultVascFrontendController implements VascFrontendControllerLoca return list; } - public void fireVascFrontendEvent(VascEntry entry,VascFrontendEventType type, Object data) { + public void fireVascFrontendEvent(VascEntry entry,VascFrontendEventType type, Serializable data) { List list = getVascEntryFrontendEventListener(type); for (VascEntryFrontendEventListener l:list) { l.vascEvent(entry, data); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java index bb83b4e..cd3815e 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendDataSelector.java @@ -31,8 +31,6 @@ import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryField; import net.forwardfire.vasc.core.actions.VascAction; import net.forwardfire.vasc.frontend.VascFrontendDataSelector; -import net.forwardfire.vasc.frontend.VascFrontendDataSelector.EntryFieldSelectType; - /** * DefaultVascFrontendDataSelector orders and filters out vasc data. diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendHelper.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendHelper.java index 649d6fe..4bd8973 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendHelper.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendHelper.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.frontend; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; @@ -107,7 +108,7 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper { return error; } - Object objectSelected = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable objectSelected = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); try { Object objectValue = field.getVascEntryFieldValue().getValue(field.getBackendName(), objectSelected); for (VascEntryFieldValidatorService s:entry.getVascFrontendController().getVascValidatorServices()) { @@ -189,12 +190,12 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper { } public String getSelectedDisplayName(VascEntry entry) { - Object row = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable row = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); if (row==null) { return "no-selection"; } VascEntryField v = entry.getVascEntryFieldById(entry.getDisplayNameFieldId()); - VascEntryFieldValue ve = v.getVascEntryFieldValue(); + VascEntryFieldValue ve = v.getVascEntryFieldValue(); String result = "no-data"; try { result = ve.getDisplayValue(v.getBackendName(), row); @@ -210,12 +211,12 @@ public class DefaultVascFrontendHelper implements VascFrontendHelper { } VascEntry parent = entry.getVascFrontendController().getVascEntryState().getParent().getVascEntry(); - Object row = entry.getVascFrontendController().getVascEntryState().getParent().getEntryDataObject(); + Serializable row = entry.getVascFrontendController().getVascEntryState().getParent().getEntryDataObject(); if (row==null) { return "no-selection"; } VascEntryField v = parent.getVascEntryFieldById(parent.getDisplayNameFieldId()); - VascEntryFieldValue ve = v.getVascEntryFieldValue(); + VascEntryFieldValue ve = v.getVascEntryFieldValue(); String result = "no-data"; try { result = ve.getDisplayValue(v.getBackendName(), row); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendPager.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendPager.java index c8ec566..872c931 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendPager.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/frontend/DefaultVascFrontendPager.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.frontend; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -56,7 +57,7 @@ public class DefaultVascFrontendPager implements VascFrontendPageInfo { VascFrontendEventType[] result = {VascEntryFrontendEventListener.VascFrontendEventType.POST_READ}; return result; } - public void vascEvent(VascEntry entry, Object data) { + public void vascEvent(VascEntry entry, Serializable data) { pagesAll = getTablePagesFromBackend(); } } diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/jndi/JndiVascControllerFactory.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/jndi/JndiVascControllerFactory.java index 8610d24..f9be7fd 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/jndi/JndiVascControllerFactory.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/jndi/JndiVascControllerFactory.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.jndi; +import java.io.Serializable; import java.util.Enumeration; import java.util.Hashtable; import java.util.List; @@ -126,7 +127,7 @@ public class JndiVascControllerFactory implements ObjectFactory { public List getVascBackendIds() { return backendController.getVascBackendIds(); } - public VascBackend getVascBackendById(String id) { + public VascBackend getVascBackendById(String id) { return backendController.getVascBackendById(id); } }); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/type/MultiTextVascEntryFieldType.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/type/MultiTextVascEntryFieldType.java index 81f1b66..da2f677 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/type/MultiTextVascEntryFieldType.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/type/MultiTextVascEntryFieldType.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.type; +import java.io.Serializable; import java.util.List; import net.forwardfire.vasc.core.VascEntryField; @@ -139,8 +140,8 @@ public class MultiTextVascEntryFieldType extends DefaultVascEntryFieldType { } } class MultiVascValueModel extends VascValueModel { - public Object getValue() throws VascException { - Object value = super.getValue(); + public Serializable getValue() throws VascException { + Serializable value = super.getValue(); //System.out.println("value: "+value+" type: "+value.getClass()); StringBuffer buf = new StringBuffer(100); if (value instanceof List) { @@ -164,7 +165,7 @@ class MultiVascValueModel extends VascValueModel { } @SuppressWarnings("unchecked") - public void setValue(Object editValueObj) throws VascException { + public void setValue(Serializable editValueObj) throws VascException { if (super.getValue()==null) { super.setValue(editValueObj); @@ -178,7 +179,7 @@ class MultiVascValueModel extends VascValueModel { String[] editList = editValue.split(",|\t|\n"); - Object value = super.getValue(); + Serializable value = super.getValue(); if (value instanceof List) { ((List)value).clear(); for (String o:editList) { diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/ui/VascSelectItemModelEntry.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/ui/VascSelectItemModelEntry.java index 1f84050..059bb1e 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/ui/VascSelectItemModelEntry.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/ui/VascSelectItemModelEntry.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.impl.ui; +import java.io.Serializable; import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -83,7 +84,7 @@ public class VascSelectItemModelEntry implements VascSelectItemModel { // set frontend data for new clone, we need te get better lifecycle management for stats/entry/etc entry.setVascFrontendController(currentEntry.getVascFrontendController()); - VascBackend back = currentEntry.getVascFrontendController().getVascController().getVascEntryConfigController().configVascBackendProxied(currentEntry.getVascFrontendController().getVascController(), entry); + VascBackend back = currentEntry.getVascFrontendController().getVascController().getVascEntryConfigController().configVascBackendProxied(currentEntry.getVascFrontendController().getVascController(), entry); try { if (nullLabel!=null) { if (nullKeyValue==null) { @@ -135,9 +136,9 @@ public class VascSelectItemModelEntry implements VascSelectItemModel { } VascEntryField field = fieldOrg.clone(); field.getVascValidators().clear(); - VascEntryFieldValue v = fieldEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); + VascEntryFieldValue v = fieldEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); - Object record = fieldEntry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable record = fieldEntry.getVascFrontendController().getVascEntryState().getEntryDataObject(); if (record==null) { //System.out.println("could not get selected records from state."); continue; @@ -155,7 +156,7 @@ public class VascSelectItemModelEntry implements VascSelectItemModel { VascEntryField fieldClone = key.clone(); fieldClone.getVascValidators().clear(); - VascEntryFieldValue v = currentEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); + VascEntryFieldValue v = currentEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); key.setVascEntryFieldValue(v); } if (dis.getVascEntryFieldValue()==null) { @@ -163,14 +164,14 @@ public class VascSelectItemModelEntry implements VascSelectItemModel { VascEntryField fieldClone = dis.clone(); fieldClone.getVascValidators().clear(); - VascEntryFieldValue v = currentEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); + VascEntryFieldValue v = currentEntry.getVascFrontendController().getVascEntryState().getVascBackend().provideVascEntryFieldValue(); dis.setVascEntryFieldValue(v); } // execute - for (Object o:back.execute(state)) { - Object keyId = key.getVascEntryFieldValue().getValue(key.getBackendName(), o); + for (Serializable o:back.execute(state)) { + Serializable keyId = key.getVascEntryFieldValue().getValue(key.getBackendName(), o); String nameId = dis.getVascEntryFieldValue().getDisplayValue(dis.getBackendName(), o); if (returnKeyValue!=null && false==returnKeyValue) { VascSelectItem item = new VascSelectItem(nameId,o,""+keyId); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/AnnotationParserElement.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/AnnotationParserElement.java index a510090..fd3cafe 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/AnnotationParserElement.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/AnnotationParserElement.java @@ -23,6 +23,7 @@ package net.forwardfire.vasc.impl.x4o; import java.io.IOException; +import java.io.Serializable; import java.io.StringReader; import java.lang.reflect.Method; import java.util.Calendar; @@ -33,7 +34,6 @@ import java.util.Map; import java.util.Properties; import java.util.Set; - import net.forwardfire.vasc.annotations.VascAnnotationParser; import net.forwardfire.vasc.annotations.VascChoices; import net.forwardfire.vasc.annotations.VascChoicesSelectItemModel; @@ -377,13 +377,13 @@ public class AnnotationParserElement extends AbstractElement { Class retType = methodCall.getReturnType(); try { //System.out.println("creating real def value of: "+defValue+" for: "+retType.getName()); - Object defObject = null; + Serializable defObject = null; if (Date.class.equals(retType)) { defObject = new Date(); } else if (Calendar.class.equals(retType)) { defObject = Calendar.getInstance(); } else { - defObject = retType.getConstructor(String.class).newInstance(defValue); + defObject = (Serializable) retType.getConstructor(String.class).newInstance(defValue); } //System.out.println("real object: "+defObject); field.setDefaultValue(defObject); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/SelectItemModelBindingHandler.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/SelectItemModelBindingHandler.java index d6d85f7..4bacc66 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/SelectItemModelBindingHandler.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/SelectItemModelBindingHandler.java @@ -23,10 +23,7 @@ package net.forwardfire.vasc.impl.x4o; import net.forwardfire.vasc.core.VascEntryField; -import net.forwardfire.vasc.core.VascEntryFieldLocal; import net.forwardfire.vasc.core.VascEntryFieldType; -import net.forwardfire.vasc.core.VascEntryListOptionLocal; -import net.forwardfire.vasc.core.VascEntryLocal; import net.forwardfire.vasc.core.ui.VascSelectItemModel; import org.x4o.xml.element.AbstractElementBindingHandler; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/VascBackendElementConfigurator.java b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/VascBackendElementConfigurator.java index ade2473..d7897a5 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/VascBackendElementConfigurator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/impl/x4o/VascBackendElementConfigurator.java @@ -23,6 +23,8 @@ package net.forwardfire.vasc.impl.x4o; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackend; import net.forwardfire.vasc.backend.VascBackendController; import net.forwardfire.vasc.backend.VascBackendControllerLocal; @@ -46,7 +48,8 @@ public class VascBackendElementConfigurator extends AbstractElementConfigurator */ public void doConfigElement(Element element) throws ElementConfiguratorException { - VascBackend backend = (VascBackend)element.getElementObject(); + @SuppressWarnings("unchecked") + VascBackend backend = (VascBackend)element.getElementObject(); VascController vascController = VascDriver.getVascController(element.getLanguageSession()); VascBackendController backendController = vascController.getVascBackendController(); diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDateFutureValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDateFutureValidator.java index 9f91dcd..da01aec 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDateFutureValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDateFutureValidator.java @@ -32,6 +32,8 @@ import java.util.Date; * @version 1.0 Sep 5, 2008 */ public class VascDateFutureValidator implements VascValidator { + + private static final long serialVersionUID = -8779126994191323884L; /** * @see net.forwardfire.vasc.validators.VascValidator#isObjectValid(java.lang.Object) diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDatePastValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDatePastValidator.java index f352f4b..ad6cbd8 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDatePastValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascDatePastValidator.java @@ -32,7 +32,9 @@ import java.util.Date; * @version 1.0 Sep 5, 2008 */ public class VascDatePastValidator implements VascValidator { - + + private static final long serialVersionUID = 74015638500286753L; + /** * @see net.forwardfire.vasc.validators.VascValidator#isObjectValid(java.lang.Object) */ diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascIntSizeValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascIntSizeValidator.java index 1ba0ee4..a53f495 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascIntSizeValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascIntSizeValidator.java @@ -31,7 +31,8 @@ import java.lang.annotation.Annotation; * @version 1.0 Sep 5, 2008 */ public class VascIntSizeValidator implements VascValidator { - + + private static final long serialVersionUID = 5208748030708077917L; private int max = Integer.MAX_VALUE; private int min = Integer.MIN_VALUE; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascLongSizeValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascLongSizeValidator.java index 5523a8e..102d701 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascLongSizeValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascLongSizeValidator.java @@ -32,6 +32,7 @@ import java.lang.annotation.Annotation; */ public class VascLongSizeValidator implements VascValidator { + private static final long serialVersionUID = -4030130692127481134L; private long max = Long.MAX_VALUE; private long min = Long.MIN_VALUE; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNotNullValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNotNullValidator.java index 58cc02f..48772df 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNotNullValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNotNullValidator.java @@ -31,7 +31,9 @@ import java.lang.annotation.Annotation; * @version 1.0 Sep 5, 2008 */ public class VascObjectNotNullValidator implements VascValidator { - + + private static final long serialVersionUID = 224078383059443142L; + /** * @see net.forwardfire.vasc.validators.VascValidator#isObjectValid(java.lang.Object) */ diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNullValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNullValidator.java index 9486785..7a22a1f 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNullValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectNullValidator.java @@ -31,7 +31,9 @@ import java.lang.annotation.Annotation; * @version 1.0 Sep 5, 2008 */ public class VascObjectNullValidator implements VascValidator { - + + private static final long serialVersionUID = 150805733891675721L; + /** * @see net.forwardfire.vasc.validators.VascValidator#isObjectValid(java.lang.Object) */ diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectUrlValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectUrlValidator.java index 2bf2a46..5f6b231 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectUrlValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascObjectUrlValidator.java @@ -36,6 +36,7 @@ import java.util.regex.Pattern; */ public class VascObjectUrlValidator implements VascValidator { + private static final long serialVersionUID = -1539950641644630956L; private Pattern pattern = null; /** diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringEmailValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringEmailValidator.java index f91f3b4..ebb332c 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringEmailValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringEmailValidator.java @@ -35,6 +35,7 @@ package net.forwardfire.vasc.validators; */ public class VascStringEmailValidator extends VascStringRegexValidator { + private static final long serialVersionUID = 6441424565202039568L; static private final String EMAIL_REGEX = "(\\w+)@(\\w+\\.)(\\w+)(\\.\\w+)*"; /** diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringLengthValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringLengthValidator.java index 6dde2a1..6489388 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringLengthValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringLengthValidator.java @@ -32,6 +32,7 @@ import java.lang.annotation.Annotation; */ public class VascStringLengthValidator implements VascValidator { + private static final long serialVersionUID = 7676298359239607685L; private Integer minLenght = 0; private Integer maxLenght = Integer.MAX_VALUE; private boolean nullable = false; diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringRegexValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringRegexValidator.java index 079ce57..7cd38a5 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringRegexValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringRegexValidator.java @@ -33,7 +33,8 @@ import java.util.regex.Pattern; * @version 1.0 Sep 5, 2008 */ public class VascStringRegexValidator implements VascValidator { - + + private static final long serialVersionUID = -7077554409967479437L; private Pattern pattern = null; /** diff --git a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringZipCodeValidator.java b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringZipCodeValidator.java index b852067..3ea38c9 100644 --- a/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringZipCodeValidator.java +++ b/vasc-core/src/main/java/net/forwardfire/vasc/validators/VascStringZipCodeValidator.java @@ -46,6 +46,7 @@ package net.forwardfire.vasc.validators; */ public class VascStringZipCodeValidator extends VascStringRegexValidator { + private static final long serialVersionUID = -8625655465308689744L; static private final String ZIP_REGEX = "^[0-9]{4}\\s*[a-zA-Z]{2}$"; /** diff --git a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/AbstractVascEntryExportWriter.java b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/AbstractVascEntryExportWriter.java index 7576242..3ca4264 100644 --- a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/AbstractVascEntryExportWriter.java +++ b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/AbstractVascEntryExportWriter.java @@ -24,6 +24,7 @@ package net.forwardfire.vasc.export.generic; import java.io.IOException; import java.io.OutputStream; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -66,7 +67,7 @@ abstract public class AbstractVascEntryExportWriter implements VascEntryExportWr int dataSize = entry.getVascFrontendController().getVascEntryState().getEntryDataList().size(); for (int dataIndex=0;dataIndex fieldList = new ArrayList(getVascEntry().getVascEntryFields()); int fields = fieldList.size(); @@ -109,5 +110,5 @@ abstract public class AbstractVascEntryExportWriter implements VascEntryExportWr } } - abstract protected void doExportRowField(Object row,VascEntryField field,boolean isLast) throws IOException,VascBackendException; + abstract protected void doExportRowField(Serializable row,VascEntryField field,boolean isLast) throws IOException,VascBackendException; } \ No newline at end of file diff --git a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterCsv.java b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterCsv.java index edf433b..701a2ae 100644 --- a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterCsv.java +++ b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterCsv.java @@ -24,6 +24,7 @@ package net.forwardfire.vasc.export.generic; import java.io.OutputStream; import java.io.PrintWriter; +import java.io.Serializable; import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.core.VascEntryField; @@ -122,17 +123,17 @@ public class VascEntryExportWriterCsv extends AbstractVascEntryExportWriter { } @Override - protected void doExportRowStart(Object row) { + protected void doExportRowStart(Serializable row) { } @Override - protected void doExportRowEnd(Object row,boolean isLast) { + protected void doExportRowEnd(Serializable row,boolean isLast) { p.write(lineEnd.toCharType()); p.flush(); } @Override - protected void doExportRowField(Object o, VascEntryField c,boolean isLast) throws VascBackendException { + protected void doExportRowField(Serializable o, VascEntryField c,boolean isLast) throws VascBackendException { p.write(quoteChar.toCharType()); p.write(c.getVascEntryFieldValue().getDisplayValue(c.getBackendName(), o)); p.write(quoteChar.toCharType()); diff --git a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterXml.java b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterXml.java index 7b4ad31..ae35e2e 100644 --- a/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterXml.java +++ b/vasc-export/vasc-export-generic/src/main/java/net/forwardfire/vasc/export/generic/VascEntryExportWriterXml.java @@ -24,6 +24,7 @@ package net.forwardfire.vasc.export.generic; import java.io.OutputStream; import java.io.PrintWriter; +import java.io.Serializable; import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.core.VascEntryField; @@ -63,18 +64,18 @@ public class VascEntryExportWriterXml extends AbstractVascEntryExportWriter { } @Override - protected void doExportRowStart(Object row) { + protected void doExportRowStart(Serializable row) { p.write("\t\n"); } @Override - protected void doExportRowEnd(Object row,boolean isLast) { + protected void doExportRowEnd(Serializable row,boolean isLast) { p.write("\t\n"); p.flush(); } @Override - protected void doExportRowField(Object o, VascEntryField c,boolean isLast) throws VascBackendException { + protected void doExportRowField(Serializable o, VascEntryField c,boolean isLast) throws VascBackendException { if (xmlTree) { p.write("\t\t<"+c.getId()+"> row = new ArrayList(30); for (VascEntryField c:fields) { row.add(c.getVascEntryFieldValue().getDisplayValue(c.getBackendName(), o)); diff --git a/vasc-export/vasc-export-json/src/main/java/net/forwardfire/vasc/export/json/VascEntryExportWriterJson.java b/vasc-export/vasc-export-json/src/main/java/net/forwardfire/vasc/export/json/VascEntryExportWriterJson.java index 3629466..33a68e5 100644 --- a/vasc-export/vasc-export-json/src/main/java/net/forwardfire/vasc/export/json/VascEntryExportWriterJson.java +++ b/vasc-export/vasc-export-json/src/main/java/net/forwardfire/vasc/export/json/VascEntryExportWriterJson.java @@ -25,6 +25,7 @@ package net.forwardfire.vasc.export.json; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; +import java.io.Serializable; import java.util.HashMap; import java.util.Map; @@ -92,12 +93,12 @@ public class VascEntryExportWriterJson extends AbstractVascEntryExportWriter { } @Override - protected void doExportRowStart(Object row) { + protected void doExportRowStart(Serializable row) { rowData.clear(); } @Override - protected void doExportRowEnd(Object row,boolean isLast) throws IOException { + protected void doExportRowEnd(Serializable row,boolean isLast) throws IOException { JSONObject.writeJSONString(rowData, p); if (isLast==false) { p.write(","); @@ -107,7 +108,7 @@ public class VascEntryExportWriterJson extends AbstractVascEntryExportWriter { } @Override - protected void doExportRowField(Object row, VascEntryField field,boolean isLast) throws VascBackendException { + protected void doExportRowField(Serializable row, VascEntryField field,boolean isLast) throws VascBackendException { String key = field.getId(); Object data = field.getVascEntryFieldValue().getValue(field.getBackendName(), row); rowData.put(key, data); diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingActionPanel.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingActionPanel.java index a50045b..0bbb5a5 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingActionPanel.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingActionPanel.java @@ -25,6 +25,7 @@ package net.forwardfire.vasc.frontend.swing; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.Serializable; import java.util.List; import javax.swing.JComboBox; @@ -158,7 +159,7 @@ public class SwingActionPanel extends JPanel implements VascEntryFrontendEventLi return result; } - public void vascEvent(VascEntry entry,Object dataNotUsed) { + public void vascEvent(VascEntry entry,Serializable dataNotUsed) { init = true; diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPagerPanel.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPagerPanel.java index a53adff..0d359b8 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPagerPanel.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPagerPanel.java @@ -25,6 +25,7 @@ package net.forwardfire.vasc.frontend.swing; import java.awt.Component; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.Serializable; import java.util.List; import javax.swing.JButton; @@ -81,7 +82,7 @@ public class SwingPagerPanel extends JPanel implements VascEntryFrontendEventLis } } - public void vascEvent(VascEntry entry, Object data) { + public void vascEvent(VascEntry entry, Serializable data) { for(Component c:result.getComponents()) { if (c instanceof JButton) { diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelFrame.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelFrame.java index f618c78..e8dcf5b 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelFrame.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelFrame.java @@ -24,6 +24,7 @@ package net.forwardfire.vasc.frontend.swing; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.io.Serializable; import java.util.HashMap; import java.util.Map; @@ -69,7 +70,7 @@ public class SwingPanelFrame implements SwingPanelIntegration { entry.getVascFrontendController().addVascEntryFrontendEventListener(new VascEntryFrontendEventListener() { private static final long serialVersionUID = -6801954395965101748L; - public void vascEvent(VascEntry entry, Object data) { + public void vascEvent(VascEntry entry, Serializable data) { if (data instanceof Exception) { Exception e = (Exception)data; e.printStackTrace(); diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelTabbed.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelTabbed.java index 250c47a..8c7d582 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelTabbed.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingPanelTabbed.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.frontend.swing; +import java.io.Serializable; + import javax.swing.JPanel; import javax.swing.JTabbedPane; @@ -56,7 +58,7 @@ public class SwingPanelTabbed implements SwingPanelIntegration { entry.getVascFrontendController().addVascEntryFrontendEventListener(new VascEntryFrontendEventListener() { private static final long serialVersionUID = -6801954395965101748L; - public void vascEvent(VascEntry entry, Object data) { + public void vascEvent(VascEntry entry, Serializable data) { if (data instanceof Exception) { Exception e = (Exception)data; e.printStackTrace(); diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascEditDialog.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascEditDialog.java index 9d46cdf..9298a2c 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascEditDialog.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascEditDialog.java @@ -105,7 +105,7 @@ public class SwingVascEditDialog extends JPanel { // Set parameters try { - Object selected = bean; + Serializable selected = bean; for (String parameterName:vle.getEntryParameterFieldIdKeys()) { String fieldId = vle.getEntryParameterFieldId(parameterName); VascEntryField v = entry.getVascEntryFieldById(fieldId); diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascFrontend.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascFrontend.java index c7629d8..2efc014 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascFrontend.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascFrontend.java @@ -187,7 +187,7 @@ public class SwingVascFrontend extends AbstractVascFrontend { } public void renderDelete() throws VascFrontendException { - Object rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable rowBean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); String beanValue = rowBean.toString(); try { diff --git a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascTableModel.java b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascTableModel.java index 51d6dd9..0fe7326 100644 --- a/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascTableModel.java +++ b/vasc-frontend/vasc-frontend-swing/src/main/java/net/forwardfire/vasc/frontend/swing/SwingVascTableModel.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.frontend.swing; +import java.io.Serializable; import java.util.ArrayList; import java.util.List; @@ -47,7 +48,7 @@ public class SwingVascTableModel extends AbstractTableModel implements VascEntry entry.getVascFrontendController().addVascEntryFrontendEventListener(this); } - public void vascEvent(VascEntry entry,Object o) { + public void vascEvent(VascEntry entry,Serializable o) { fireTableDataChanged(); } @@ -79,7 +80,7 @@ public class SwingVascTableModel extends AbstractTableModel implements VascEntry * @see javax.swing.entry.entryModel#getValueAt(int, int) */ public Object getValueAt(int rowIndex, int columnIndex) { - Object bean = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex); + Serializable bean = entry.getVascFrontendController().getVascEntryState().getEntryDataList().get(rowIndex); // TODO: this is slowing.... List list = new ArrayList(); diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtActionPanel.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtActionPanel.java index 9cbc30f..2c0e87d 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtActionPanel.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtActionPanel.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.frontend.swt; +import java.io.Serializable; import java.util.List; import net.forwardfire.vasc.core.VascEntry; @@ -125,7 +126,7 @@ public class SwtActionPanel implements VascEntryFrontendEventListener { return result; } - public void vascEvent(VascEntry entry,Object dataNotUsed) { + public void vascEvent(VascEntry entry,Serializable dataNotUsed) { vascEvent = true; long pageSize = entry.getVascFrontendController().getVascFrontendPageInfo().getPageSize(); diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtPagerPanel.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtPagerPanel.java index 0e07675..0bb3576 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtPagerPanel.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtPagerPanel.java @@ -22,6 +22,7 @@ package net.forwardfire.vasc.frontend.swt; +import java.io.Serializable; import java.util.List; import net.forwardfire.vasc.core.VascEntry; @@ -76,7 +77,7 @@ public class SwtPagerPanel implements VascEntryFrontendEventListener { return result; } - public void vascEvent(VascEntry entry,Object dataNotUsed) { + public void vascEvent(VascEntry entry,Serializable dataNotUsed) { } } diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascEditDialog.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascEditDialog.java index 04df7a9..819d03f 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascEditDialog.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascEditDialog.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.frontend.swt; +import java.io.Serializable; + import net.forwardfire.vasc.backend.VascBackendException; import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryField; @@ -125,7 +127,7 @@ public class SwtVascEditDialog extends Dialog { } String name = null; try { - Object bean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable bean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); name = dis.getVascEntryFieldValue().getDisplayValue(dis.getBackendName(), bean); } catch (VascBackendException e) { throw new RuntimeException("Could not display value from "+entry.getId(),e); @@ -156,7 +158,7 @@ public class SwtVascEditDialog extends Dialog { public void createBody(Composite body) throws VascException { body.setLayout(new GridLayout(2, true)); body.setLayoutData(new GridData(GridData.FILL_BOTH)); - Object bean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); + Serializable bean = entry.getVascFrontendController().getVascEntryState().getEntryDataObject(); entry.getVascFrontendController().clearFieldRenderObjects(); // only needed for swt use diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascFrontend.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascFrontend.java index 9d90675..7f0d0c1 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascFrontend.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/SwtVascFrontend.java @@ -478,7 +478,7 @@ public class SwtVascFrontend extends AbstractVascFrontend { VascFrontendEventType[] result = {VascEntryFrontendEventListener.VascFrontendEventType.POST_READ}; return result; } - public void vascEvent(VascEntry entry,Object data) { + public void vascEvent(VascEntry entry,Serializable data) { tableViewer.refresh(); table2.deselectAll(); } @@ -638,7 +638,7 @@ public class SwtVascFrontend extends AbstractVascFrontend { //if (vtc.getVascColumnRenderer()==null) { try { - return vtc.getVascEntryFieldValue().getDisplayValue(vtc.getBackendName(),bean); + return vtc.getVascEntryFieldValue().getDisplayValue(vtc.getBackendName(),(Serializable) bean); } catch (Exception e) { logger.log(Level.WARNING,"Error in get value: '"+vtc.getVascEntryFieldValue()+"' error: "+e.getMessage(),e); return "Err"; diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtText.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtText.java index 127ec61..8c4ff2f 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtText.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtText.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.frontend.swt.ui; +import java.io.Serializable; + import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryField; import net.forwardfire.vasc.core.ui.VascUIComponent; @@ -72,7 +74,7 @@ public class SwtText implements VascUIComponent { } public void modifyText(ModifyEvent e) { - Object value = text.getText(); + Serializable value = text.getText(); try { model.setValue(value); } catch (VascException ve) { diff --git a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtTextArea.java b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtTextArea.java index 2d14f48..f4b41cf 100644 --- a/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtTextArea.java +++ b/vasc-frontend/vasc-frontend-swt/src/main/java/net/forwardfire/vasc/frontend/swt/ui/SwtTextArea.java @@ -22,6 +22,8 @@ package net.forwardfire.vasc.frontend.swt.ui; +import java.io.Serializable; + import net.forwardfire.vasc.core.VascEntry; import net.forwardfire.vasc.core.VascEntryField; import net.forwardfire.vasc.core.ui.VascUIComponent; @@ -96,7 +98,7 @@ public class SwtTextArea implements VascUIComponent { } public void modifyText(ModifyEvent e) { - Object value = text.getText(); + Serializable value = text.getText(); try { model.setValue(value); } catch (VascException ve) { diff --git a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntryEventListener.java b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntryEventListener.java index 5b1a484..cb9051f 100644 --- a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntryEventListener.java +++ b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntryEventListener.java @@ -62,7 +62,7 @@ public class JSFVascEntryEventListener implements VascEntryFrontendEventListener - public void vascEvent(VascEntry entry,Object dataNotUsed) { + public void vascEvent(VascEntry entry,Serializable dataNotUsed) { /* moved to fillVascEntryFrontend try { for (VascEntryField field:entry.getVascEntryFields()) { diff --git a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntrySupportBean.java b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntrySupportBean.java index b666577..37922cc 100644 --- a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntrySupportBean.java +++ b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascEntrySupportBean.java @@ -584,7 +584,7 @@ public class JSFVascEntrySupportBean implements Serializable { logger.fine("moveAction"); String moveAction = getComponentType(event.getComponent()); JSFVascUIComponent comp = JSFVascUIComponent.findVascParent(event.getComponent()); - Object selected = comp.getSupportBean().getSelectedTableRecord().getRecord(); + Serializable selected = comp.getSupportBean().getSelectedTableRecord().getRecord(); if ("up".equals(moveAction)) { entry.getVascFrontendController().getVascFrontendActions().moveUpAction(selected); } diff --git a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponent.java b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponent.java index 666a3d1..0c0d123 100644 --- a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponent.java +++ b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponent.java @@ -339,7 +339,7 @@ public class JSFVascUIComponent extends UIComponentBase { // Set parameters try { - Object selected = getSupportBean().getSelected().getRecord(); + Serializable selected = getSupportBean().getSelected().getRecord(); for (String parameterName:link.getEntryParameterFieldIdKeys()) { String fieldId = link.getEntryParameterFieldId(parameterName); VascEntryField v = getVascEntry().getVascEntryFieldById(fieldId); @@ -361,7 +361,7 @@ public class JSFVascUIComponent extends UIComponentBase { for (String fieldId:link.getEntryCreateFieldValueKeys()) { String selectedfieldId = link.getEntryParameterFieldId(fieldId); - Object selectedValue = selected; + Serializable selectedValue = selected; if (selectedfieldId!=null) { VascEntryField v = getVascEntry().getVascEntryFieldById(selectedfieldId); selectedValue = v.getVascEntryFieldValue().getValue(v.getBackendName(), selected); @@ -385,8 +385,8 @@ public class JSFVascUIComponent extends UIComponentBase { class CreateEntryFieldValuesListener2 implements VascEntryFrontendEventListener { private static final long serialVersionUID = 1L; private String fieldId = null; - private Object value = null; - public CreateEntryFieldValuesListener2(String fieldId,Object value) { + private Serializable value = null; + public CreateEntryFieldValuesListener2(String fieldId,Serializable value) { if (fieldId==null) { throw new NullPointerException("fieldId may not be null"); } @@ -397,7 +397,7 @@ public class JSFVascUIComponent extends UIComponentBase { VascFrontendEventType[] result = {VascEntryFrontendEventListener.VascFrontendEventType.PRE_CREATE}; return result; } - public void vascEvent(VascEntry entry,Object data) { + public void vascEvent(VascEntry entry,Serializable data) { VascEntryField field = entry.getVascEntryFieldById(fieldId); try { field.getVascEntryFieldValue().setValue(field.getBackendName(), data, value); diff --git a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponentRenderer.java b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponentRenderer.java index 0339f04..1ae5ddd 100644 --- a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponentRenderer.java +++ b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/JSFVascUIComponentRenderer.java @@ -346,7 +346,7 @@ public class JSFVascUIComponentRenderer extends Renderer { } public void processValueChange(ValueChangeEvent event) throws AbortProcessingException { try { - model.setValue(event.getNewValue()); + model.setValue((Serializable)event.getNewValue()); } catch (VascException e) { throw new AbortProcessingException(e); } diff --git a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/VascDataBackendBean.java b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/VascDataBackendBean.java index 4e1b2bd..ce18326 100644 --- a/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/VascDataBackendBean.java +++ b/vasc-frontend/vasc-frontend-web-jsf/src/main/java/net/forwardfire/vasc/frontend/web/jsf/VascDataBackendBean.java @@ -92,8 +92,8 @@ public class VascDataBackendBean implements Serializable { private void setValue(int index,Object valueObject) { try { VascEntryField field = getFieldIdByIndex(entry,index); - VascEntryFieldValue value = field.getVascEntryFieldValue(); - value.setValue(field.getBackendName(), record,valueObject); + VascEntryFieldValue value = field.getVascEntryFieldValue(); + value.setValue(field.getBackendName(), record,(Serializable)valueObject); // TODO: rm cast } catch (VascBackendException e) { throw new RuntimeException("Could not set value on record.",e); }