简体   繁体   中英

ajax call in jsf with popup window

Below is my code in .xhtml file. I need to add ajax call in one of the inputtextbox component. Say.. on blur of inputtextbox where id="search_dias" i should make ajax call with popup window showing the response value and then i should place that value in inputTextBox where id="search_partyName"

 <html xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui">  
    <h:form>
        <p:panel id="panel1" styleClass ="myPanelStyle1"  header="SEARCH PRODUCTIONS " toggleable="true" toggleSpeed="100">
          <h:panelGrid columns="3" border="0" rules="group">
                  <p:column >
                     <h:outputLabel  for="search_dia" value="Diameter:"/>
                  </p:column>
                  <p:column>
                     <p:inputText  id="search_dias" value="#{addFormRequest.diameter}"/>
                  </p:column>
                  <p:tooltip for="search_dias" value="Enter Dia Value" showEffect="fade" hideEffect="fade" />
                  <p:column >
                     <h:outputLabel for="search_partyName" value="PartyName:"/>              
                  </p:column>
                  <p:column>
                     <p:inputText  id="search_partyName" value="#{addFormRequest.search_partyName}"/> 
                  </p:column>
                  <p:tooltip for="search_partyName" value="Enter Party Name" showEffect="fade" hideEffect="fade" /> 
                  <p:column >
                     <h:outputLabel for="search_date" value="Date:"/>
                  </p:column>
                  <p:calendar  id="search_date" value="#{addFormRequest.search_date}"/>
                  <p:tooltip for="search_date" value="Enter Production Date" showEffect="fade" hideEffect="fade" /> 
                  <p:commandButton id="searchProductions" value="SEARCH" action="search"  />
              </h:panelGrid>
         </p:panel>  
  </h:form> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM