org.zkoss.jsf.zul.impl
Class BaseDoublebox.DoubleFormatConverter

java.lang.Object
  extended by org.zkoss.jsf.zul.impl.BaseDoublebox.DoubleFormatConverter
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.convert.Converter
Enclosing class:
BaseDoublebox

public static class BaseDoublebox.DoubleFormatConverter
extends java.lang.Object
implements javax.faces.convert.Converter

Converter String to Double, or Double to String by a DecimalFormat.

Author:
Dennis.Chen

Field Summary
protected  java.lang.String _format
           
 
Constructor Summary
BaseDoublebox.DoubleFormatConverter()
           
BaseDoublebox.DoubleFormatConverter(java.lang.String format)
           
 
Method Summary
protected  void formatChanged()
           
 java.lang.Object getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.String value)
           
 java.lang.String getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, java.lang.Object value)
           
 java.lang.String getFormat()
           
 boolean isTransient()
           
 void restoreState(javax.faces.context.FacesContext context, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext context)
           
 void setFormat(java.lang.String format)
           
 void setTransient(boolean newTransientValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_format

protected java.lang.String _format
Constructor Detail

BaseDoublebox.DoubleFormatConverter

public BaseDoublebox.DoubleFormatConverter()

BaseDoublebox.DoubleFormatConverter

public BaseDoublebox.DoubleFormatConverter(java.lang.String format)
Method Detail

formatChanged

protected void formatChanged()

getAsObject

public java.lang.Object getAsObject(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.String value)
Specified by:
getAsObject in interface javax.faces.convert.Converter

getAsString

public java.lang.String getAsString(javax.faces.context.FacesContext context,
                                    javax.faces.component.UIComponent component,
                                    java.lang.Object value)
Specified by:
getAsString in interface javax.faces.convert.Converter

setFormat

public void setFormat(java.lang.String format)

getFormat

public java.lang.String getFormat()

isTransient

public boolean isTransient()
Specified by:
isTransient in interface javax.faces.component.StateHolder

restoreState

public void restoreState(javax.faces.context.FacesContext context,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext context)
Specified by:
saveState in interface javax.faces.component.StateHolder

setTransient

public void setTransient(boolean newTransientValue)
Specified by:
setTransient in interface javax.faces.component.StateHolder


Copyright © 2005-2007 Potix Corporation. All Rights Reserved.