You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov> on 2006/10/04 01:41:55 UTC
findComponent mistery
Hi,
Given:
<h:form id="frm">
<h:inputText id="in"/>
</h:form>
I try the following in my action:
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getViewRoot().findComponent("in")
this return null because HtmlForm is NOT a namingcontainer according to
MyFaces/JSF. Is that normal? Seems like a form, of all things, should be
a NamingContainer, no?
Best,
Bolerio
RE: findComponent mistery
Posted by "Iordanov, Borislav (GIC)" <bo...@miamidade.gov>.
Actually, sorry, a form is NamingContainer, but then the lookup seems
weird, why it's returning null?
________________________________
From: Iordanov, Borislav (GIC) [mailto:boris@miamidade.gov]
Sent: Tuesday, October 03, 2006 7:42 PM
To: MyFaces Discussion
Subject: findComponent mistery
Hi,
Given:
<h:form id="frm">
<h:inputText id="in"/>
</h:form>
I try the following in my action:
FacesContext ctx = FacesContext.getCurrentInstance();
ctx.getViewRoot().findComponent("in")
this return null because HtmlForm is NOT a namingcontainer according to
MyFaces/JSF. Is that normal? Seems like a form, of all things, should be
a NamingContainer, no?
Best,
Bolerio