[JBoss Seam] - Re: How to impliment a Paged + Sorted DataTable (session) wi
by antispart
"petemuir" wrote : I suspect this was because although the context variable was being refereshed, the java variable in your SFSB wasn't null, so the @Factory wasn't being called. Did you have an @Out, or did you use @Factory("list", scope=ScopeType.EVENT)?
You're right. I switched to using @Factory(value="list", scope=ScopeType.EVENT) and that worked as expected. Now I have a new issue though:
The search list page also has an area that displays the current selection. It uses an a4j:commandButton to reRender the "currentSelection" outputPanel. This worked fine with the list in session scope, now that it's in Event scope everytime I select a new item from the list to be displayed in the "currentSelection" area the @Factory for the list gets called and it makes a new call to the DB.
I'm not sure why this should happen, b/c it's not reRendering the list outputPanel just the "currentSelection" one... so why would the list @Factory be called?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986590#3986590
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986590
19Â years, 7Â months
[EJB 3.0] - mappedBy reference an unknown target entity property
by svanbegin01
I would like to define a ManyToMany association between
2 Entities A and C.
As an additional property is required in the JoinTable, I tried
to define 2 OneToMany associations involving a new entity B.
Each time I deploy on jboss-4.0.5.GA, I get this error:
org.hibernate.AnnotationException :
mappedBy reference an unknown target entity property :
com.acme.dev001.ejb.B.a in com.acme.dev001.ejb.A.bs
What's wrong in the code that follows ?
--------------- A -----------------------
@Entity
public class A implements java.io.Serializable {
@Id
private short aNo;
@OneToMany(
targetEntity = com.acme.dev001.ejb.B.class,
cascade = CascadeType.ALL,
fetch = FetchType.EAGER,
mappedBy = "a"
)
private Collection< B> bs = new ArrayList< B>();
--------------- B -----------------------
@IdClass(com.acme.dev001.ejb.BKey.class)
@Entity
public class B implements java.io.Serializable {
@Id
@ManyToOne(targetEntity=com.acme.dev001.ejb.A.class)
@JoinColumn(name="aNo", nullable=false, updatable=false, insertable=false)
private A a;
@Id
@ManyToOne(targetEntity=com.acme.dev001.ejb.C.class)
@JoinColumn(name="cNo", nullable=false, updatable=false, insertable=false)
protected C c;
--------------- C -----------------------
@Entity
public class C implements java.io.Serializable {
@Id
private short cNo;
@OneToMany(
targetEntity = com.acme.dev001.ejb.B.class,
cascade = CascadeType.ALL,
fetch = FetchType.EAGER,
mappedBy = "c"
)
private Collection< B> bs = new HashSet< B>();
--------------------------------------------
Thanks,
Serge
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3986587#3986587
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3986587
19Â years, 7Â months