common-util

local.tomas.faces.converter
Class ExpressionConverter

java.lang.Object
  extended by local.tomas.faces.converter.ExpressionConverter
All Implemented Interfaces:
javax.faces.convert.Converter

public class ExpressionConverter
extends Object
implements javax.faces.convert.Converter

A JSF Converter for expressions.

Author:
tomas

Field Summary
static String MULTILINE
          Multiline option.
 
Constructor Summary
ExpressionConverter()
           
 
Method Summary
 Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
          Compile string to expression.
 String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, Object value)
          Decompile expression to string.
protected  Locale getLocale()
          Get locale.
protected  int getOptions(javax.faces.component.UIComponent component)
          Get options of component.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MULTILINE

public static final String MULTILINE
Multiline option.

See Also:
Constant Field Values
Constructor Detail

ExpressionConverter

public ExpressionConverter()
Method Detail

getLocale

protected Locale getLocale()
Get locale.

Returns:
Returns the locale.

getOptions

protected int getOptions(javax.faces.component.UIComponent component)
Get options of component.

Parameters:
component - the component
Returns:
the options

getAsObject

public Object getAsObject(javax.faces.context.FacesContext context,
                          javax.faces.component.UIComponent component,
                          String value)
Compile string to expression.

Specified by:
getAsObject in interface javax.faces.convert.Converter
Parameters:
context - faces context
component - the component
value - the value entered in component
Returns:
compiled string.

getAsString

public String getAsString(javax.faces.context.FacesContext context,
                          javax.faces.component.UIComponent component,
                          Object value)
Decompile expression to string.

Specified by:
getAsString in interface javax.faces.convert.Converter
Parameters:
context - faces context
component - the component
value - the expression
Returns:
string representation of value

common-util

Copyright © 2007 null. All Rights Reserved.