Hi there,
I've got this kind of relation between two entities :
@Entity public class Entity1 implements Serializable { ... private Entity2 entity2; ... @NotNull @OneToOne @JoinColumn(name = "entity2_id") public Entity2 getEntity2() { return entity2; } }
I've got an edit page for the Entity1, with a field which references the entity2.name attribute. The user can select different values thanks to a rich:suggestionbox. What I can't achieve is to wire the Entity2 with the Entity1 based on the user's selection. From what I've seen, I'm not able to use the @DataModel annotation. Perhaps a valueChangeListener ?
Any help would be really appreciated.
Thanks,
Yann
Hello,
Take a look at the <s:convertEntity> Seam tag. Documentation can be found in chapter Seam JSF controls
of Seam specs (chapter 32 for Seam 2.1.1 docs).