ajax - How to get the input value after an other event in jsf? -
hava inputtext , gmap
<h:inputtext class="text" value="#{restaurant.address}" /> <p:gmap id="gmap" center="21.027845,105.852268" zoom="12" type="roadmap" style="width:360px;height:388px" model="#{restaurant.emptymodel}" onpointclick="handlepointclick(event);" widgetvar="map">
first, address=""
, when click on gmap, address="xxx"
not null.so how can show value in inputtext tag after clicking on gmap. thank you!
you can add ajax event map
<p:gmap id="gmap" center="21.027845,105.852268" zoom="12" type="roadmap" style="width:360px;height:388px" model="#{restaurant.emptymodel}" onpointclick="handlepointclick(event);" widgetvar="map"> <p:ajax event="pointselect" update="theinputtext"/> </p:gmap>
where theinputtext
going id of <p:inputtext/>
updated
Comments
Post a Comment