| 1 33 34 package com.icesoft.faces.component.util; 35 36 import javax.faces.component.UIComponent; 37 import javax.faces.context.FacesContext; 38 import javax.faces.el.ValueBinding; 39 import javax.faces.webapp.UIComponentTag; 40 41 public abstract class UICustomComponentTag extends UIComponentTag { 42 43 protected void setStringProperty(UIComponent component, 44 FacesContext facesContext, 45 String property, String propertyName) { 46 if (property != null) { 47 if (isValueReference(property)) { 48 ValueBinding vb = facesContext.getApplication() 49 .createValueBinding(property); 50 component.setValueBinding(propertyName, vb); 51 } else { 52 component.getAttributes().put(propertyName, property); 53 } 54 } 55 } 56 } 57 | Popular Tags |