protected Object getDataToStore(FacesContext context, Object data) {
return storeData(context, ICON_COLOR, BACKGROUND_COLOR, BORDER_COLOR);
}
protected Object storeData(FacesContext context, String colorSkinParam, String backgroundSkinParam, String borderSkinParam) {
Skin skin = SkinFactory.getInstance().getSkin(context);
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
byte [] ret = new byte[9];
Color color = null;
Zipper2 zipper = new Zipper2(ret);
String color1 = (String) skin.getParameter(context, colorSkinParam);
if (null == color1 || "".equals(color1))
color1 = (String) defaultSkin.getParameter(context, colorSkinParam);
if (color1 == null) {
color1 = "#FFFFFF";
}
color = HtmlColor.decode(color1);
zipper.addColor(color);
String color2 = (String) skin.getParameter(context, backgroundSkinParam);
if (null == color2 || "".equals(color2))
color2 = (String) defaultSkin.getParameter(context, backgroundSkinParam);
if (color2 == null) {
color2 = "#000000";
}
color = HtmlColor.decode(color2);
zipper.addColor(color);
String color3 = (String) skin.getParameter(context, borderSkinParam);
if (null == color3 || "".equals(color3))
color3 = (String) defaultSkin.getParameter(context, backgroundSkinParam);
if (color3 == null) {
color3 = "#000000";
}