Class DurationConverter
java.lang.Object
org.apache.myfaces.tobago.convert.DurationConverter
- All Implemented Interfaces:
- javax.faces.convert.Converter
Converts durations. The duration value in the model is of type long.
 The string format must have one of this patterns:
 
   
- hh:MM:ss
- MM:ss
- ss
| input string | unit | resulting long in model | Remark | 
|---|---|---|---|
| 1:15 | milli | 75000 | |
| 1:15:00 | hour | 1 | Loosing 15 Minutes! | 
| 1:15:00 | null | 4500000 | 
- 
Field SummaryFieldsFields inherited from interface javax.faces.convert.ConverterDATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String string) getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object object) 
- 
Field Details- 
CONVERTER_ID- See Also:
 
 
- 
- 
Constructor Details- 
DurationConverterpublic DurationConverter()
 
- 
- 
Method Details- 
getAsStringpublic String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object object) throws javax.faces.convert.ConverterException - Specified by:
- getAsStringin interface- javax.faces.convert.Converter
- Throws:
- javax.faces.convert.ConverterException
 
- 
getAsObjectpublic Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String string) throws javax.faces.convert.ConverterException - Specified by:
- getAsObjectin interface- javax.faces.convert.Converter
- Throws:
- javax.faces.convert.ConverterException
 
 
-