myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arash Bijanzadeh" <aras...@gmail.com>
Subject findComponenet problem
Date Sat, 15 Apr 2006 09:15:45 GMT
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" >
                <h:outputLabel for="type" value="#{messages['type']}"/>
                    <h:selectOneMenu id="type" value="#{neBean.neType}"
valueChangeListener="#{neLogic.processValueChange}"   onchange="
this.form.submit();">
                        <f:selectItems value="#{lookups['NeType']}"/>
                        <f:converter converterId="neTypeConverter"/>
                    </h:selectOneMenu>
 <snip/>
                <h:outputLabel for="gc" value="#{messages['gc']}"/>
                <h:selectOneMenu id="gc" value="#{neBean.gc}" >
                        <f:converter converterId="yesNoConverter"/>
                        <f:selectItems value="#{lookups['YesNo']}"/>
                </h:selectOneMenu>

                <h:outputLabel for="capacity"
value="#{messages['capacity']}"/>
                <h:inputText id="capacity" value="#{neBean.capacity}" />

                <h:outputLabel for="incomeDate"
value="#{messages['incomeDate']}"/>
                <h:inputText id="incomeDate" value="#{neBean.incomeDate}">
                    <f:converter converterId="persianDate"/>
                </h:inputText>

                <c:choose>
                    <c:when test="${neBean.neType.name == 'PMP' or
neBean.neType.name == 'BTS'}">

                        <h:outputLabel for="composition"
value="#{messages['composition']}" />
                        <h:inputText id="composition" value="#{
neBean.composition}" />

                        <h:outputLabel for="tower"
value="#{messages['tower']}"/>
                        <h:selectOneMenu id="tower" value="#{neBean.tower}"
>
                                <f:converter converterId="towerConverter"/>
                                <f:selectItems value="#{lookups['Tower']}"/>
                        </h:selectOneMenu>

                        <h:outputLabel for="link"
value="#{messages['link']}"/>
                        <h:selectOneMenu id="link" value="#{neBean.link}" >
                                <f:converter converterId="linkConverter"/>
                                <f:selectItems value="#{lookups['Link']}"/>
                        </h:selectOneMenu>

                        <h:outputLabel for="inOutdoor"
value="#{messages['inOutdoor']}"/>
                        <h:selectOneMenu id="inOutdoor" value="#{
neBean.inOutdoor}" >
                                <f:converter
converterId="inOutdoorConverter"/>
                                <f:selectItems
value="#{lookups['InOutdoor']}"/>
                        </h:selectOneMenu>

                        <h:outputLabel for="cover"
value="#{messages['cover']}"/>
                        <h:selectOneMenu id="cover" value="#{neBean.cover}"
>
                                <f:converter converterId="coverConverter"/>
                                <f:selectItems value="#{lookups['Cover']}"/>
                        </h:selectOneMenu>

                        <h:outputLabel for="constructor"
value="#{messages['constructor']}"/>
                        <h:inputText id="constructor" value="#{
neBean.constructor}" />

                        <h:outputLabel for="version"
value="#{messages['version']}"/>
                        <h:inputText id="version" value="#{neBean.version}"
/>

                    </c:when>
                </c:choose>
                <c:choose>
                    <c:when test="#{neBean.neType.name == 'BTS'}">

                        <h:outputLabel for="transhop1"
value="#{messages['transhop']} 1"/>
                        <h:inputText id="transhop1" value="#{
neBean.transhop1}" />

                        <h:outputLabel for="transhop1"
value="#{messages['transhop']} 2"/>
                        <h:inputText id="transhop1" value="#{
neBean.transhop2}" />

                        <h:outputLabel for="transhop1"
value="#{messages['transhop']} 3"/>
                        <h:inputText id="transhop1" value="#{
neBean.transhop3}" />

                        <h:outputLabel for="transhop1"
value="#{messages['transhop']} 4"/>
                        <h:inputText id="transhop1" value="#{
neBean.transhop4}" />

                        <h:outputLabel for="hdslRadio"
value="#{messages['hdslRadio']}"/>
                        <h:inputText id="hdslRadio" value="#{
neBean.hdslRadio}" />
                        <h:outputLabel for="bscName" value="BSC"/>

                    <h:inputText id ="bscName" value="#{neBean.bsc.name}"
disabled="true"/>                        <<<<<<<<<<<<<<<<<<<<<,
                        <h:commandLink id="setBcs" action="#{neLogic.goPopup}"
onclick="showDiv('test');"  target="popup">pop</h:commandLink>
                         <h:outputText>&nbsp;</h:outputText>

                    </c:when>
                </c:choose>


            </h:panelGrid>

            <h:commandButton id="saveNe" value="#{messages.save}" action="#{
neLogic.save}" class="button"/>&nbsp;
            <h:commandButton value="#{messages.cancel}" action="#{
neList.list}" class="button"/>
        </h:form>
.................

But getting null instead of thre component.
What is wrong here?

--
from debian manifesto:
Debian Linux is a brand-new kind of Linux distribution.
Rather than being developed by one isolated individua
l or group, as other distributions of Linux have been developed in the
past, Debian is being developed openly in the spirit of Linux and GNU.

Mime
View raw message