myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Kienenberger" <mkien...@gmail.com>
Subject Re: findComponenet problem
Date Wed, 19 Apr 2006 00:32:43 GMT
On 4/15/06, Arash Bijanzadeh <arashbi@gmail.com> wrote:
> I am trying to do a :
> UIOutput c= (UIOutput)
> facesContext.getViewRoot().findComponent("main:bscName");
> And my page looks like:
> ......
>   <h:form id="main" >
>             <h:panelGrid id="myvar" columns="4"
> columnClasses="label,nothing,label,nothing" >
[...]
>                 <c:choose>
>                     <c:when test="#{neBean.neType.name == 'BTS'}">
[...]
>                     <h:inputText id ="bscName" value="#{ neBean.bsc.name}"
> disabled="true"/>
[...]
>
>                     </c:when>
>                 </c:choose>
>             </h:panelGrid>
[...]
>         </h:form>
> .................
>
> But getting null instead of thre component.
> What is wrong here?

Either you've specified an id on an unshown naming container (f:view,
f:subview), or your c:choose statement didn't evaluate to true.  My
understanding is that "#{neBean.neType.name == 'BTS'}" is only
evaluated with the page is initially compiled (first request).   You
probably should be using h:panelGroup rendered="#{neBean.neType.name
== 'BTS'}" instead.

Mime
View raw message