Пример #1
0
  private String getResourceLocation(FacesContext facesContext) {
    if (skinDependent) {
      SkinFactory skinFactory = SkinFactory.getInstance(facesContext);
      String skinName = skinFactory.getSkin(facesContext).getName();
      return ResourceSkinUtils.evaluateSkinInPath(location, skinName);
    }

    return location;
  }
 @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);
   }
 }
Пример #3
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);
    }
  }
Пример #4
0
 public static Object getSkinHashCode(FacesContext context) {
   Skin skin = SkinFactory.getInstance(context).getSkin(context);
   return getSkinHashCode(context, skin);
 }
 @Override
 public Object getValue(ELContext elContext) {
   FacesContext facesContext = getFacesContext(elContext);
   return SkinFactory.getInstance(facesContext).getSkin(facesContext);
 }