This content has been marked as final.
Show 20 replies
-
15. Re: Value is not Valid with <s:entityConverter and equals an
sergeypk2 Jan 26, 2008 3:09 PM (in response to franck93)Here's my hacked version of EntityLoader that worked for me:
@Name("org.jboss.seam.ui.entityLoader") @Scope(STATELESS) public class CustomEntityLoader extends EntityLoader { @Override protected Identifier createIdentifier(Object entity) { return new CustomEntityIdentifier(entity, getPersistenceContext()); } }
public class CustomEntityIdentifier extends EntityIdentifier { public CustomEntityIdentifier(Object entity, EntityManager entityManager) { super(entity, entityManager); } @Override public Object find(EntityManager entityManager) { Object result = super.find(entityManager); if (result instanceof HibernateProxy) { return ((HibernateProxy) result).getHibernateLazyInitializer() .getImplementation((SessionImplementor) entityManager.getDelegate()); } return result; } }
-
16. Re: Value is not Valid with <s:entityConverter and equals an
franck93 Jan 26, 2008 6:00 PM (in response to franck93)Here's my hacked version of EntityLoader that worked for me
So you just put that in your classpath and thanks to the annotation@Name("org.jboss.seam.ui.entityLoader")
it gets called automatically?? -
17. Re: Value is not Valid with <s:entityConverter and equals an
sergeypk2 Jan 27, 2008 5:02 AM (in response to franck93)Yes, that's my understanding of how Seam components are meant to be replaced/extended.
-
18. Re: Value is not Valid with <s:entityConverter and equals an
stian Feb 8, 2008 8:43 AM (in response to franck93)Is it really necessary to apply such dirty hacks just to get simple management of many-to-one relationships working?
I would expect that such simple things should work out of the box with a framework with all sort of advanced stuff... -
19. Re: Value is not Valid with <s:entityConverter and equals an
pmuir Feb 17, 2008 2:23 PM (in response to franck93)No one put this in JIRA so that we can fix it - its a bug probably. If you want it fixed, put in JIRA, don't just complain.
-
20. Re: Value is not Valid with <s:entityConverter and equals an
bad May 15, 2012 8:09 AM (in response to pmuir)This maybe solves the problem:
https://community.jboss.org/thread/183558
In short: use x.getId() not id directly.