public class DurationConverter extends Object implements javax.faces.convert.Converter
| 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 |
| Modifier and Type | Field and Description |
|---|---|
static String |
CONVERTER_ID |
| Constructor and Description |
|---|
DurationConverter() |
| Modifier and Type | Method and Description |
|---|---|
Object |
getAsObject(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
String string) |
String |
getAsString(javax.faces.context.FacesContext facesContext,
javax.faces.component.UIComponent component,
Object object) |
public static final String CONVERTER_ID
public String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object object) throws javax.faces.convert.ConverterException
getAsString in interface javax.faces.convert.Converterjavax.faces.convert.ConverterExceptionpublic Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String string) throws javax.faces.convert.ConverterException
getAsObject in interface javax.faces.convert.Converterjavax.faces.convert.ConverterExceptionCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.