primefaces - Call backing bean from p:inputText ondblclick -


i need double click on p:inputtext inside p:datatable bring me page , launch details. possible call backing bean method primefaces p:inputtext ondblclick?

p:inputtext normal input in end, can use jquery register ondblclick on it, can call p:remotecommand reach bean.

i assume have multiple inputext since have datatable.

xhtml

<p:datatable var="car" value="#{bean.cars}">       <p:column headertext="model">           <p:inputtext value="#{car.model}" styleclass="dbclickinput" />         </p:column>   </p:datatable>   <p:remotecommand name="calldetailscommand"                   actionlistener="#{bean.calldetails()}" /> 
<script>   $(document).ready(function() {        $('.dbclickinput').dblclick(           function() {             calldetailscommand([{name: 'carmodelvalue', value: $(this).val()}]);           }       );    }); </script> 

bean

public void calldetails() {    facescontext context = facescontext.getcurrentinstance();    map map = context.getexternalcontext().getrequestparametermap();    string carmodelvalue = (string) map.get("carmodelvalue"); } 

hope helps.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -