On 4/15/06, Arash Bijanzadeh <[EMAIL PROTECTED]> 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.