public String getInputId() { String id = getFor(); if (id==null) { UIComponent evh = Decoration.getEditableValueHolder(this); return evh==null ? null : evh.getId(); } else { return id; } }
/** * A depth-first search for an EditableValueHolder */ public static UIComponent getEditableValueHolder(UIComponent component) { for (Object child: component.getChildren()) { if (child instanceof EditableValueHolder) { UIComponent evh =(UIComponent) child; if ( evh.isRendered() ) { return evh; } } else if (child instanceof UIComponent) { UIComponent evh = getEditableValueHolder( (UIComponent) child ); if (evh!=null) return evh; } } return null; }
private String getInputClientId() { String id = getFor(); if (id==null) { UIComponent evh = Decoration.getEditableValueHolder(this); return evh==null ? null : evh.getClientId( getFacesContext() ); } else { // As UIDecorate implements NamingContainer it alters the search // algorithm used by JSF UIComponent component = null; if (getParent() != null) { component = getParent().findComponent(id); } return component==null ? null : component.getClientId( getFacesContext() ); } }