[jboss-user] [JBoss Seam] - Re: EntityHome request parameter
seammm
do-not-reply at jboss.com
Sun Apr 1 22:07:43 EDT 2007
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;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033572#4033572
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033572
More information about the jboss-user
mailing list