示例#1
0
  protected void setProperties(UIComponent component) {
    super.setProperties(component);
    if (component != null) {
      Help help = ((Help) component);
      if (this.helpTextBundle != null) {
        if (isValueReference(this.helpTextBundle)) {
          ValueBinding vb =
              getFacesContext().getApplication().createValueBinding(this.helpTextBundle);
          help.setValueBinding("helpTextBundle", vb);
        } else {
          help.setHelpTextBundle(this.helpTextBundle);
        }
      }

      if (this.helpTextKey != null) {
        if (isValueReference(this.helpTextKey)) {
          ValueBinding vb = getFacesContext().getApplication().createValueBinding(this.helpTextKey);
          help.setValueBinding("helpTextKey", vb);
        } else {
          help.setHelpTextKey(this.helpTextKey);
        }
      }

      if (this.image != null) {
        if (isValueReference(this.image)) {
          ValueBinding vb = getFacesContext().getApplication().createValueBinding(this.image);
          help.setValueBinding("image", vb);
        } else {
          help.setImage(this.image);
        }
      }
    }
  }