<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Answers to: delete current tab and keep the other unsubmited tab data in the form</title><link>https://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-form</link><description>&lt;p&gt;I have accordion panel inside a form with tow button one for add tabs ,another for next.&lt;/p&gt;
&lt;p&gt;each tab have inputtexts and delete button to delete this tab.&lt;/p&gt;
&lt;p&gt;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 .&lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;so how can I delete previous tab without validation the current tab and keep the data in current tab.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;h:form id="form"&amp;gt;            
    &amp;lt;p:accordionPanel  var="job" value="#{data.JobSet.toArray()}"&amp;gt;
        &amp;lt;p:tab title="title"&amp;gt;
           &amp;lt;p:outputPanel&amp;gt;
       &amp;lt;p:panelGrid&amp;gt;
        &amp;lt;p:outputLabel for="Company" value="Company"&amp;gt;&amp;lt;/p:outputLabel&amp;gt;
        &amp;lt;p:inputText id="Company" required="true"
         styleClass="inputFullWidth" value="#{job.name}"&amp;gt;&amp;lt;/p:inputText&amp;gt;

        &amp;lt;p:outputLabel value="Industry"&amp;gt;&amp;lt;/p:outputLabel&amp;gt;
        &amp;lt;p:inputText  value="#{job.industry}"&amp;gt;&amp;lt;/p:inputText&amp;gt;
      &amp;lt;/p:panelGrid&amp;gt;
   &amp;lt;/p:outputPanel&amp;gt;
   &amp;lt;p:commandButton  immediate="true"
       value="Delete"
       actionListener="#{logic.deleteJob(job)}" update="#{cc.id}:form"  
       icon="fa fa-trash-o"&amp;gt;&amp;lt;/p:commandButton&amp;gt;     
        &amp;lt;/p:tab&amp;gt;

    &amp;lt;/p:accordionPanel&amp;gt;
    &amp;lt;div&amp;gt;
     &amp;lt;p:commandButton validateClient="true"   
      value="Add"  actionListener="#{logic.addPJob}" update="form" &amp;gt;
     &amp;lt;/p:commandButton&amp;gt;

     &amp;lt;p:commandButton validateClient="true"
      value="Next" actionListener="#{logic.send}" update="form" process="form" /&amp;gt;
 &amp;lt;/div&amp;gt;
&amp;lt;/h:form&amp;gt;
&lt;/code&gt;&lt;/pre&gt;</description><atom:link href="https://answers.axonivy.com/questions/2658/delete-current-tab-and-keep-the-other-unsubmited-tab-data-in-the-form" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 30 Jul 2024 07:15:22 -0000</lastBuildDate></channel></rss>