This content has been marked as final.
Show 1 reply
-
1. Re: EntityHome request parameter
seammm Apr 1, 2007 10:07 PM (in response to seammm)I was wrong in saying eventId param is passed.. It was passed initially during the creation of the instance but not when it was being saved.. I missed this little detail at 4am..
I have found that the following is a solution, as documented in chapter 10.2
@Factory("event")
public Event initEvent() {
return getInstance();
}
protected Event createInstance() {
Event event = new Event();
Event parent = getEntityManager().find(Event.class, Long.valueOf(parentId));
event.setParent(parent);
return event;
}