Hi there, I am a newbie with Tapestry (and JAVA) and maybe missing
something obvious while trying to save the value of an embedded class.
Scenario is as follows. User class has embedded property ContactInfo
that stores address, email, website and so on. I managed to embed the
email field into a grid and the corresponding UserEdit page. But as soon
as I try to save/update I get an exception "Failure writing parameter
'value' of component core/PropertyEditBlocks:textfield:
org.apache.tapestry5.ioc.internal.util.TapestryException".
Any hints are welcome. I paste part of the code below. I use Tapestry
5.1.0.5 on Google App Engine. If more information is required, please
let me know.
Regards
Daniel
------------------------------------
User.java
...
@Embedded
@Persistent(defaultFetchGroup = "true")
private ContactInfo contactInfo;
...
setter & getter
...
------------------------------------
BaseDAOImpl.java
public BaseDAOImpl() {
try {
_class =
Class.forName(getClass().getGenericSuperclass().toString().split("[<>]")[1]);
} catch (ClassNotFoundException e) {
log.error(e.getMessage(), e);
throw new RuntimeException(e.getMessage());
}
}
...
@Override
public void save(T obj) {
getPersistenceManager();
try {
pm.makePersistent(obj);
} finally {
pm.close();
}
}
...
------------------------------------
UserEdit.java
...
public BeanModel<User> getModel() {
BeanModel<User> model =
beanModelSource.createEditModel(User.class, resources);
model.add("email", propertyConduitSource.create(User.class,
"contactInfo.email")).dataType("text");
return model;
}
...
------------------------------------
userEdit.tml
...
<t:beaneditform t:id="form" t:object="user" model="model">
</t:beaneditform>
...
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org