Note that there are some explanatory texts on larger screens.

plurals
  1. POp:ajax update not working after clicking commandlink
    text
    copied!<p>I have a jsf page that adds an order from a client.<br> All works fine except when I click the commandLink to show the p:dialog to add a new client the update on the "reste" inputtext stop working (even if I close the p:dialog without adding the new client) :</p> <p>Clients List :</p> <pre><code>&lt;strong&gt;Client :&lt;/strong&gt;&lt; &lt;p:autoComplete id="client" value="#{venteSolaireBean.client}" completeMethod="#{venteSolaireBean.autocompleteClient}" var="item" itemLabel="#{item.nom} #{item.prenom}" itemValue="#{item}" converter="#{venteSolaireBean.clientConverter}" dropdown="true" scrollHeight="200" &gt; &lt;/p:autoComplete&gt; </code></pre> <p>Link to a p:dialog to add a new Cleint :</p> <pre><code>&lt;p:commandLink onclick="dlgClient.show()" immediate="true"&gt; &lt;img src="images-main/add-icon.gif" border="0" alt="Add Client" class="img-action"/&gt; &lt;/p:commandLink&gt; </code></pre> <p>Three p:inputtext items with ajax behavior :</p> <pre><code>&lt;strong&gt;Montant :&lt;/strong&gt; &lt;p:inputText value="#{venteSolaireBean.venteSolaire.montant}"&gt; &lt;p:ajax event="keyup" update="reste" listener="#{venteSolaireBean.calcul}" /&gt; &lt;/p:inputText&gt; &lt;strong&gt;Avance :&lt;/strong&gt;&lt;/td&gt; &lt;p:inputText value="#{venteSolaireBean.venteSolaire.avance}"&gt; &lt;p:ajax event="keyup" update="reste" listener="#{venteSolaireBean.calcul}" /&gt; &lt;/p:inputText&gt; &lt;strong&gt;Reste :&lt;/strong&gt;&lt;/td&gt; &lt;p:inputText id="reste" value="#{venteSolaireBean.venteSolaire.reste}"&gt; &lt;/p:inputText&gt; </code></pre> <p>The venteSolaireBean.calcul function to execute with the listener :</p> <pre><code>public void calcul() { venteSolaire.setReste(venteSolaire.getMontant() - venteSolaire.getAvance()); } </code></pre> <p>I checked by logging the calcul() function and I'm sure it was invoked and the value giving to setReste() is correct.</p> <p>I don't see why inputtext didn't update.<br> please help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload