javax.faces.convert
Class EnumConverter

java.lang.Object
  extended by javax.faces.convert.EnumConverter
All Implemented Interfaces:
PartialStateHolder, StateHolder, Converter

@JSFConverter
public class EnumConverter
extends Object
implements Converter, PartialStateHolder

see Javadoc of JSF Specification

Author:
Stan Silvert

Field Summary
static String CONVERTER_ID
           
static String ENUM_ID
           
static String ENUM_NO_CLASS_ID
           
 
Constructor Summary
EnumConverter()
          Creates a new instance of EnumConverter
EnumConverter(Class targetClass)
           
 
Method Summary
 void clearInitialState()
           
 Object getAsObject(FacesContext facesContext, UIComponent uiComponent, String value)
           
 String getAsString(FacesContext facesContext, UIComponent uiComponent, Object value)
           
 boolean initialStateMarked()
           
 boolean isTransient()
           
 void markInitialState()
           
 void restoreState(FacesContext context, Object state)
           
 Object saveState(FacesContext context)
           
 void setTransient(boolean newTransientValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERTER_ID

public static final String CONVERTER_ID
See Also:
Constant Field Values

ENUM_ID

public static final String ENUM_ID
See Also:
Constant Field Values

ENUM_NO_CLASS_ID

public static final String ENUM_NO_CLASS_ID
See Also:
Constant Field Values
Constructor Detail

EnumConverter

public EnumConverter()
Creates a new instance of EnumConverter


EnumConverter

public EnumConverter(Class targetClass)
Method Detail

getAsString

public String getAsString(FacesContext facesContext,
                          UIComponent uiComponent,
                          Object value)
                   throws ConverterException
Specified by:
getAsString in interface Converter
Throws:
ConverterException

getAsObject

public Object getAsObject(FacesContext facesContext,
                          UIComponent uiComponent,
                          String value)
                   throws ConverterException
Specified by:
getAsObject in interface Converter
Throws:
ConverterException

restoreState

public void restoreState(FacesContext context,
                         Object state)
Specified by:
restoreState in interface StateHolder

saveState

public Object saveState(FacesContext context)
Specified by:
saveState in interface StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface StateHolder

isTransient

public boolean isTransient()
Specified by:
isTransient in interface StateHolder

clearInitialState

public void clearInitialState()
Specified by:
clearInitialState in interface PartialStateHolder

initialStateMarked

public boolean initialStateMarked()
Specified by:
initialStateMarked in interface PartialStateHolder

markInitialState

public void markInitialState()
Specified by:
markInitialState in interface PartialStateHolder


Copyright © 2015 The Apache Software Foundation. All Rights Reserved.