Actually, sorry, a form is NamingContainer, but then the lookup seems weird, why it’s returning null?

 

 


From: Iordanov, Borislav (GIC) [mailto:[EMAIL PROTECTED]
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

 

 

Reply via email to