Primefaces: текстовое поле не обновляется, когда диалог скрывается

Я пытаюсь обновить текстовое поле из диалогового окна. Текстовое поле находится в родительском компоненте. Но этого не происходит. Если я дам идентификатор текстового поля в обновлении кнопки команды. Я столкнулся с ошибкой:javax.faces.FacesException: не удается найти компонент с идентификатором «customerCode», на который ссылается «tabView: lkpSltRec»

Поскольку он не может найти идентификатор компонента. Я использовал альтернативу. Я взял скрытое поле. После нажатия кнопки команды скрытое поле обновляется и с помощью простой функции javascript я обновляю текстовое поле родительского компонента. Функция javascript вызывается из-за неполного нажатия кнопки в диалоговом окне. Так как, в соответствии с требованиями проекта, я должен достичь его только с помощью простых символов, а не через JavaScript. Плз, предложите мне подход в начертаниях. Ниже приведен фрагмент кода:

Здесь ecap: lookup является компонентом настройки.

    Selected Customer <p:inputText id="customerCode"
        value="#{sixthTabBBean.customerName}" label="Selected Adddress"></p:inputText>
    Selected Customer City <p:inputText id="selectedCity"   value="#{sixthTabBBean.customerCity}"  ></p:inputText>
    <ecap:lookup lookupId="LOV0072" inputId="customerCode" clickStatus="city"
        defaultDDValueIndex="0" title="CustomerCode"></ecap:lookup>

        New LOV <ecap:lookup lookupId="LOV0092" inputId="customerCode" clickStatus="none"
        defaultDDValueIndex="0" title="CustomerCode"></ecap:lookup>

    City<p:inputText id="custCity" value="#{sixthTabBBean.customerCity}"
        disabled="true" label="City"></p:inputText>
    Selected Customer <p:inputText id="customerCode1"
        value="#{sixthTabBBean.customerName}" label="Selected Adddress" ></p:inputText>
    Selected Customer City <p:inputText id="selectedCity1"  value="#{sixthTabBBean.customerCity}"  ></p:inputText>
    Selected Customer State <p:inputText id="selectedSate1"     value="#{sixthTabBBean.customerState}"  ></p:inputText>
    <ecap:lookup lookupId="LOV0098" inputId="customerCode" clickStatus="state"
        defaultDDValueIndex="0" title="CustomerCode"></ecap:lookup>
    <p:dialog id="lkpDialog" widgetVar="lpDialogVar" header="Lookup"
        modal="true" width="1000" height="600"
        rendered="#{lookupSearch.popupRender}"  >
        <h:form  rendered="#{lookupSearch.popupRender}"  prependId="false">
            <h:panelGrid cellpadding="10" id="diaFrmId">
                <p:dataTable id="newfdt" var="flxSearch"
                    value="#{lookupSearch.lkpSearchCriteriaList}">

                    <p:column id="newwhc">
                        <f:facet name="header">
                            <h:outputLabel value="Search Fields"></h:outputLabel>
                        </f:facet>
                        <p:selectOneMenu styleClass="fdd180" id="newwdd"
                            value="#{flxSearch.searchCriterion.whereClause}">
                            <f:selectItems value="#{flxSearch.whrClausDropdown}" />
                        </p:selectOneMenu>
                    </p:column>

                    <p:column id="newcoc">
                        <f:facet name="header">
                            <h:outputLabel value="Conditions"></h:outputLabel>

                        </f:facet>
                        <p:selectOneMenu id="newco" styleClass="fdd95"
                            value="#{flxSearch.searchCriterion.operator}">
                            <f:selectItems id="newcriOperatorItms"
                                value="#{flxSearch.operatorDropdown}" />
                        </p:selectOneMenu>
                    </p:column>

                    <p:column id="newcic">
                        <f:facet name="header">
                            <h:outputLabel value="Value"></h:outputLabel>

                        </f:facet>
                        <p:inputText id="newcriInpNm"
                            rendered="#{!flxSearch.inputDate and !flxSearch.boolValue and !flxSearch.required}"
                            styleClass="285 ftb" deferChangeEvent="true"
                            value="#{flxSearch.searchCriterion.value}"
                            maxlength="#{flxSearch.maxLength}"
                            disabled="#{flxSearch.disableInput}" partialSubmit="true"
                            labelValue="#{flxSearch.searchCriterion.label}"
                            required="#{flxSearch.required}">
                        </p:inputText>

                        <p:inputText id="newcriInpM"
                            rendered="#{!flxSearch.inputDate and !flxSearch.boolValue and flxSearch.required }"
                            value="#{flxSearch.searchCriterion.value}"
                            maxlength="#{flxSearch.maxLength}"
                            disabled="#{flxSearch.disableInput}"
                            labelValue="#{flxSearch.searchCriterion.label}"
                            required="#{flxSearch.required}">

                        </p:inputText>

                        <p:selectOneMenu styleClass="fdd" id="newbldd"
                            value="#{flxSearch.searchCriterion.value}"
                            disabled="#{flxSearch.disableInput}"
                            rendered="#{flxSearch.boolValue }">
                            <f:selectItems value="#{flxSearch.booleanDropdown}" />
                        </p:selectOneMenu>

                        <p:calendar id="newcriDtNm" size="9"
                            rendered="#{flxSearch.inputDate and !flxSearch.boolValue and !flxSearch.required }"
                            disabled="#{flxSearch.disableInput}" showOn="button"
                            value="#{flxSearch.searchCriterion.value}"
                            labelValue="#{flxSearch.searchCriterion.label}">
                        </p:calendar>

                        <p:calendar id="newcriDtM" size="9"
                            rendered="#{flxSearch.inputDate and !flxSearch.boolValue and flxSearch.required }"
                            disabled="#{flxSearch.disableInput}"
                            value="#{flxSearch.searchCriterion.value}"
                            enableChangeDetector="false" partialSubmit="true"
                            labelValue="#{flxSearch.searchCriterion.label}"
                            required="#{flxSearch.required}" showOn="button">
                        </p:calendar>

                    </p:column>
                </p:dataTable>
                <!-- hidden text used to update values in the parent component -->
                <p:inputText  type="hidden" id="hiddencustomerCode"  
                    value="#{sixthTabBBean.customerName}"   ></p:inputText>
                <p:inputText  type="hidden" id="hiddencustCity"  
                    value="#{sixthTabBBean.customerCity}"   ></p:inputText>
                <p:inputText  type="hidden" id="hiddencustState"  
                value="#{sixthTabBBean.customerState}"   ></p:inputText>

                <p:fieldset legend="Combined By">
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:selectOneRadio id="newSlctDrk"
                            valueChangeListener="#{lookupSearch.getSelectedLogOpr}"
                            value="#{lookupSearch.selLogOpr}"
                            title="Combine all search criteria with AND or OR">
                            <f:selectItems id="newSlctDrkItms"
                                value="#{lookupSearch.logicalOperators}" />
                        </p:selectOneRadio>
                    </h:panelGrid>
                </p:fieldset>
                <h:panelGrid columns="3">
                    <p:commandButton value="Find" id="lkpfndDg" update="resultFldSet"
                        actionListener="#{lookupSearch.search}">
                    </p:commandButton>
                    <p:commandButton value="Clear" id="lkpClearDg"
                        actionListener="#{lookupSearch.clear}" />
                </h:panelGrid>
                <p:fieldset legend="Result" id="resultFldSet">
                        <p:dataTable binding="#{lookupSearch.lkpResultDataTable}"
                            value="#{lookupSearch.searchResultsForPage}"></p:dataTable>
                </p:fieldset>
                <p:commandButton value="Select" id="lkpSltRec" update="customerCode"
                    oncomplete="lpDialogVar.hide();insertSelectedValue();"
                    actionListener="#{lookupSearch.selectValue}" />
            </h:panelGrid>
        </h:form>
    </p:dialog>

</h:panelGrid>

Здесь ecap: lookup является компонентом настройки.

Ответы на вопрос(1)

Ваш ответ на вопрос