Klasse DurationConverter

java.lang.Object
org.apache.myfaces.tobago.convert.DurationConverter
Alle implementierten Schnittstellen:
javax.faces.convert.Converter

public class DurationConverter extends Object implements 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
There may be an optional attribute "unit" in the component, which allows to set the unit of the model. The default unit is "millis".
Examples
input stringunitresulting long in modelRemark
1:15milli75000
1:15:00hour1Loosing 15 Minutes!
1:15:00null4500000
  • Feldübersicht

    Felder
    Modifizierer und Typ
    Feld
    Beschreibung
    static final String
     

    Von Schnittstelle geerbte Felder javax.faces.convert.Converter

    DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
  • Konstruktorübersicht

    Konstruktoren
    Konstruktor
    Beschreibung
     
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    getAsObject(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)
     

    Von Klasse geerbte Methoden java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Felddetails

  • Konstruktordetails

    • DurationConverter

      public DurationConverter()
  • Methodendetails

    • getAsString

      public String getAsString(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, Object object) throws javax.faces.convert.ConverterException
      Angegeben von:
      getAsString in Schnittstelle javax.faces.convert.Converter
      Löst aus:
      javax.faces.convert.ConverterException
    • getAsObject

      public Object getAsObject(javax.faces.context.FacesContext facesContext, javax.faces.component.UIComponent component, String string) throws javax.faces.convert.ConverterException
      Angegeben von:
      getAsObject in Schnittstelle javax.faces.convert.Converter
      Löst aus:
      javax.faces.convert.ConverterException