org.jboss.seam.ui.converter
Class EntityConverter

java.lang.Object
  extended by org.jboss.seam.ui.converter.EntityConverter
All Implemented Interfaces:
java.io.Serializable, javax.faces.convert.Converter

@Name(value="org.jboss.seam.ui.EntityConverter")
@Scope(value=CONVERSATION)
@Install(precedence=0)
@Converter
@BypassInterceptors
public class EntityConverter
extends java.lang.Object
implements javax.faces.convert.Converter, java.io.Serializable

Allows conversion of an entity to/from a key which can be written to a page. Any annotated Entity will work, or any entity if a PersistenceProvider for your ORM exists

See Also:
Serialized Form

Constructor Summary
EntityConverter()
           
 
Method Summary
 void create()
           
 java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent cmp, java.lang.String value)
           
 java.lang.String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent cmp, java.lang.Object value)
           
 void setEntityManager(org.jboss.seam.core.Expressions.ValueExpression<javax.persistence.EntityManager> entityManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityConverter

public EntityConverter()
Method Detail

create

@Create
public void create()

getAsString

@Transactional
public java.lang.String getAsString(javax.faces.context.FacesContext facesContext,
                                                  javax.faces.component.UIComponent cmp,
                                                  java.lang.Object value)
                             throws javax.faces.convert.ConverterException
Specified by:
getAsString in interface javax.faces.convert.Converter
Throws:
javax.faces.convert.ConverterException

getAsObject

@Transactional
public java.lang.Object getAsObject(javax.faces.context.FacesContext facesContext,
                                                  javax.faces.component.UIComponent cmp,
                                                  java.lang.String value)
                             throws javax.faces.convert.ConverterException
Specified by:
getAsObject in interface javax.faces.convert.Converter
Throws:
javax.faces.convert.ConverterException

setEntityManager

public void setEntityManager(org.jboss.seam.core.Expressions.ValueExpression<javax.persistence.EntityManager> entityManager)


Copyright © 2007. All Rights Reserved.