Questions Tagged With primefaceshttps://answers.axonivy.com/tags/primefaces/?type=rss&user=hibanassarquestions tagged <span class="tag">primefaces</span>enThu, 01 Jun 2017 03:27:46 -0400delete current tab and keep the other unsubmited tab data in the formhttps://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-form<p>I have accordion panel inside a form with tow button one for add tabs ,another for next.</p> <p>each tab have inputtexts and delete button to delete this tab.</p> <p>some of tab fields are required ,and I can not add a new tab if the required not filled but I can delete any tab .</p> <p>the problem : if I have aleady tabs and add a new one with some inputs filled then I want to delete previous tab ,the delete button will update the whole page and remove the last added tab data from the form without processing them.</p> <p>so how can I delete previous tab without validation the current tab and keep the data in current tab.</p> <pre><code>&lt;h:form id="form"&gt; &lt;p:accordionPanel var="job" value="#{data.JobSet.toArray()}"&gt; &lt;p:tab title="title"&gt; &lt;p:outputPanel&gt; &lt;p:panelGrid&gt; &lt;p:outputLabel for="Company" value="Company"&gt;&lt;/p:outputLabel&gt; &lt;p:inputText id="Company" required="true" styleClass="inputFullWidth" value="#{job.name}"&gt;&lt;/p:inputText&gt; &lt;p:outputLabel value="Industry"&gt;&lt;/p:outputLabel&gt; &lt;p:inputText value="#{job.industry}"&gt;&lt;/p:inputText&gt; &lt;/p:panelGrid&gt; &lt;/p:outputPanel&gt; &lt;p:commandButton immediate="true" value="Delete" actionListener="#{logic.deleteJob(job)}" update="#{cc.id}:form" icon="fa fa-trash-o"&gt;&lt;/p:commandButton&gt; &lt;/p:tab&gt; &lt;/p:accordionPanel&gt; &lt;div&gt; &lt;p:commandButton validateClient="true" value="Add" actionListener="#{logic.addPJob}" update="form" &gt; &lt;/p:commandButton&gt; &lt;p:commandButton validateClient="true" value="Next" actionListener="#{logic.send}" update="form" process="form" /&gt; &lt;/div&gt; &lt;/h:form&gt; </code></pre>hibanassarThu, 01 Jun 2017 03:27:46 -0400https://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-formjsfprimefaces