<p:tabview> is not keeping track of data when page is reloaded in PrimeFaces 4.0

无人久伴 提交于 2019-12-25 01:50:17

问题


Hi I have some validation on my form (Java web application), and when the validation is displayed, it should reload the page. When it does this, I lose all the data input in the dropdown list in first tab.(Data in text boxes are retained)

Below is how I define my tabview :

<p:tabView id="tabView" dynamic="true">

Anyone can help on this? Thanks in Advance

I am using PrimeFaces 4.0, spring, hibernate.

   <h:form prependId="false">
     <p:panel>
          <h:panelGrid id="detail" columns="2" styleClass="grid"columnClasses="label,value">


              <p:tabView id="tabView" dynamic="true" >


                 <p:tab id="tab1" title="bUS Details">

                  <h:outputTextvalue="#{ebusmsgs['ebus.bustitle.title']}:" />

                  <h:inputText id="ebus_bustitle" value="#{BusComponent.bus.empMinDiv}" />
                 </p:tab>

                 <p:tab id="tab2" title="Mechanic Details">
                     <h:outputTextvalue="#{ebusmsgs['ebus.mechanictitle.title']}:" />

                     <h:inputText id="ebus_mechanictitle" value="#{BusComponent.bus.empMinDiv}" />
                 </p:tab>
              </p:tabView>
          </h:panelGrid>
     </p:panel>
   </h:form>

来源:https://stackoverflow.com/questions/22953508/ptabview-is-not-keeping-track-of-data-when-page-is-reloaded-in-primefaces-4-0

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!