org.jboss.seam.ui
Class EntityConverter

java.lang.Object
  extended by org.jboss.seam.ui.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. Support is provided for JPA (by default) and Hibernate (with the session specified in components.xml)

See Also:
Serialized Form

Constructor Summary
EntityConverter()
           
 
Method Summary
 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)
           
 AbstractEntityLoader getEntityLoader()
           
 void setEntityLoader(AbstractEntityLoader entityLoader)
           
 
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

getEntityLoader

public AbstractEntityLoader getEntityLoader()

setEntityLoader

public void setEntityLoader(AbstractEntityLoader entityLoader)

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


Copyright © 2008 JBoss. All Rights Reserved.