[jboss-user] [JBoss Seam] - Re: Value is not Valid with <s:entityConverter and equals an

sergeypk2 do-not-reply at jboss.com
Sat Jan 26 15:09:55 EST 2008


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;
  | 	}
  | }
  | 


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123770#4123770

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123770



More information about the jboss-user mailing list