Skip to main content

Posts

Showing posts with the label find UICompoent

ADF Utility : Find UIComponent from Managed Bean

Many a times, it is required to find an UIComponent from ADF managed bean, to do something with it, for example : change the value of an af:outputText, change readOnly property of an af:inputText etc.     private UIComponent getUIComponent(String id) {                  FacesContext facesCtx = FacesContext.getCurrentInstance();          return findComponent(facesCtx.getViewRoot(), id);     }          private UIComponent findComponent(UIComponent base, String id) {                 if (id.equals(base.getId())) {             return base;         }         UIComponent children = null;       ...