Note that there are some explanatory texts on larger screens.

plurals
  1. POjsf and primefaces update problem
    primarykey
    data
    text
    <p>I have a JSF page with two forms (pseudo-code below). </p> <p>First form is for a user and has text fields and a table of phone numbers, and a link for adding a new phone number. </p> <p>Second form is the p:dialog that shows the form for adding a phone number to the list.</p> <p>The problem I have is after the p:dialog closes, I want the list is not getting updated. If I put the p:dialog tag inside the first form, the list does get updated but there are two separate forms because I need their contents to be validated in separate actions.</p> <p>SHORT VERSION OF MY QUESTION: The p:dialog has an attr update="phonesPanel" but phonePanel is in a different form; how do I do something like update="personForm.phonesPanel" so it updates the list which is in a different form?</p> <pre><code>&lt;h:form id="personForm"&gt; &lt;p:messages /&gt; &lt;h:inputText label="Full Name" value="... /&gt; &lt;p:commandLink value="Add Phone Number" onclick="dlg.show();" /&gt; &lt;h:panelGrid id="phonesPanel" columns="1" style="width:100%" &gt; &lt;h:dataTable id="phonesTable"&gt; // ... &lt;/h:dataTable&gt; &lt;/h:panelGrid&gt; &lt;/h:form&gt; &lt;h:form&gt; &lt;p:dialog id="dialog" modal="true" widgetVar="dlg"&gt; &lt;p:messages /&gt; &lt;h:inputText label="Phone Number" value="... /&gt; &lt;p:commandButton value="Add Phone Number" update="phonesPanel" actionListener="#{handler.doAddPhoneNumber}" oncomplete="handleLoginRequest(xhr, status, args)"/&gt; &lt;/p:dialog&gt; &lt;/h:form&gt; </code></pre> <p>Any help is greatly appreciated!</p> <p>rob</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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