Why does UICompoent.getCurrentComponent sometimes return the parent of the current component?
posted 5 years ago
According to the API docs, UIComponent.getCurrentComponent(FacesContext) should return the UICompnoent that is currently processing. Unfortunately it is not doing this, or I am not understanding why it returns the component I am seeing. I am using JSF 2.0, Mojarra.
I have a very simple form:
The backing bean has the relevant getter and setter:
As I have stated in the comments, "UIComponent.getCurrentComponent" does not consistently return the "inputText", it quite often returns the "panelGrid". I totally understand that the "panelGrid" will be restored during the Faces lifecycle, but it is not bound to "[get|set]AttrValue", only the "inputText" is.
Why am I seeing "panelGrid" as the current component in the "[get|set]AttrValue"?