@PostConstructResource
 public void initialize() {
   FacesContext context = FacesContext.getCurrentInstance();
   Skin skin = SkinFactory.getInstance(context).getSkin(context);
   Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);
   basicColor = skin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
   if (basicColor == null) {
     basicColor = defaultSkin.getColorParameter(context, Skin.SELECT_CONTROL_COLOR);
   }
 }
Example #2
0
  @PostConstructResource
  public void initialize() {
    FacesContext context = FacesContext.getCurrentInstance();
    Skin skin = SkinFactory.getInstance(context).getSkin(context);
    Skin defaultSkin = SkinFactory.getInstance(context).getDefaultSkin(context);

    this.color = skin.getColorParameter(context, colorParam);
    if (this.color == null) {
      this.color = defaultSkin.getColorParameter(context, colorParam);
    }
  }
Example #3
0
 public static Object getSkinHashCode(FacesContext context, Skin skin) {
   int hashCode = skin.hashCode(context);
   ByteBuffer buf = ByteBuffer.allocate(4);
   byte[] bs = buf.putInt(hashCode).array();
   return bs;
 }