Package de.xima.fc.appointment
Class LegacyPrimeFacesHexColorConverter
- java.lang.Object
-
- de.xima.fc.appointment.LegacyPrimeFacesHexColorConverter
-
- All Implemented Interfaces:
javax.faces.convert.Converter<String>
public class LegacyPrimeFacesHexColorConverter extends Object implements javax.faces.convert.Converter<String>
Legacy converter for the PrimeFacesp:colorPicker
component. From their changelog:Value used to be hex only without the # like ffffff but now if using hex it includes the #fffffff because the new picker supports Hex, RGB, HSL color values.
We do not have any issue using CSS like color values, but we need to ensure that values from existing entities stored in the database are loaded correctly. When encountering a raw color string such as3aff9b
, this converter adds a hashtag to the beginning of the string to make it compatible with the new color picker.- Since:
- 8.2.0
- Author:
- XIMA Media GmbH
-
-
Constructor Summary
Constructors Constructor Description LegacyPrimeFacesHexColorConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAsObject(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
String
getAsString(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component, String value)
-